Hi,
I'm trying to use [hid] tu retrieve joystick infos on a linux box (Ubuntu Studio 7.10) : no joystick recognition. On Mac, if I click on the "print" msg box, I have a list of all devices available. On linux clicking on "print" doesn't list anything. My joystick is installed properly because I can use it with the [pd_joystick] extra.
Why dont I just use [pd_joystick] ? Because I need to use 2 joysticks and only the first one is recognized on [pd_joystick]...
Other thing : if you forget to put the toggle box to off when you select another device number, pd-extended (0.39) just close (brutally...).
Regards,
Jean-Martin (esox)
I know about the PD commands that detect keypress but is there a command that generates a keypress. I wanted to send commands to another program and it would be nice if PD could do that by mimicking a keyboard. Thanks, Jim.
hi jim
what os are you on? in pd-cvs in externals/aalex you'll find x11key, which does exactly that. afaik, it is _not_ included in pd-extended. it does only work on linux, though (hm.. at least it seems to need the x window system).
roman
On Sat, 2007-12-15 at 02:14 -0500, jim wrote:
I know about the PD commands that detect keypress but is there a command that generates a keypress. I wanted to send commands to another program and it would be nice if PD could do that by mimicking a keyboard. Thanks, Jim.
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
On Sat, 2007-12-15 at 02:14 -0500, jim wrote:
I know about the PD commands that detect keypress but is there a command that generates a keypress. I wanted to send commands to another program and it would be nice if PD could do that by mimicking a keyboard. Thanks, Jim.
hi jim
what os are you on? in pd-cvs in externals/aalex you'll find x11key, which does exactly that. afaik, it is _not_ included in pd-extended. it does only work on linux, though (hm.. at least it seems to need the x window system).
roman
Thanks Roman, I'm working on Linux and sometimes forced to use Windows so I would be looking for a solution in both. I'll have a look at aalex. Anyone know of a Windows solution? Jim
___________________________________________________________ Der frhe Vogel fngt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
jim ruxton a écrit :
On Sat, 2007-12-15 at 02:14 -0500, jim wrote:
I know about the PD commands that detect keypress but is there a command that generates a keypress. I wanted to send commands to another program and it would be nice if PD could do that by mimicking a keyboard. Thanks, Jim.
hi jim
what os are you on? in pd-cvs in externals/aalex you'll find x11key, which does exactly that. afaik, it is _not_ included in pd-extended. it does only work on linux, though (hm.. at least it seems to need the x window system).
roman
Thanks Roman, I'm working on Linux and sometimes forced to use Windows so I would be looking for a solution in both. I'll have a look at aalex. Anyone know of a Windows solution? Jim
With VkKeyScan() function
Patrice Colet a écrit :
Thanks Roman, I'm working on Linux and sometimes forced to use Windows so I would be looking for a solution in both. I'll have a look at aalex. Anyone know of a Windows solution? Jim
With VkKeyScan() function
keybd_event() seems to be more suitable, is this attached external provide what you need? I might try also to give [winkey] the same behavior as [x11key] for having a compatible external, for the moment it was simplier for me to use ascii character strings for sending key strokes.
I have been converting midi into keystrokes with midiStroke for OS X
http://www.apple.com/downloads/macosx/audio/midistroke.html
I think on windows people are using: http://www.midiox.com/
It would be great it pd could do this!
On Dec 15, 2007 9:57 PM, Patrice Colet pat@mamalala.org wrote:
Patrice Colet a écrit :
Thanks Roman, I'm working on Linux and sometimes forced to use Windows so I would be looking for a solution in both. I'll have a look at aalex. Anyone know of a Windows solution? Jim
With VkKeyScan() function
keybd_event() seems to be more suitable, is this attached external provide what you need? I might try also to give [winkey] the same behavior as [x11key] for having a compatible external, for the moment it was simplier for me to use ascii character strings for sending key strokes.
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
beau a écrit :
I have been converting midi into keystrokes with midiStroke for OS X
http://www.apple.com/downloads/macosx/audio/midistroke.html
I think on windows people are using: http://www.midiox.com/
It would be great it pd could do this!
midiox program converts Keystrokes to MIDI Notes, it doesn't emulate keystrokes.
There might be a trick to do this with macosx API ,like I did with windows API in [winkey]?
PureData can do this on linux and now on windows with the help of different externals. I bet many users would love to have a single external for both platforms, that uses the same parameters, same help file, the object would have then the same name, it wouldn't be x11key anymore but [keystroke] or something like this and would work on most platforms. Aalex, what do you think?
Hello, I've made another external for generating keystrokes on win32, it still uses the same process but has a different name, and it's documented.
Great . Thank you I'll take a look at it. Jim On Mon, 2007-12-17 at 05:24 +0100, Patrice Colet wrote:
Hello, I've made another external for generating keystrokes on win32, it still uses the same process but has a different name, and it's documented. _______________________________________________ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Dec 16, 2007, at 5:32 PM, Patrice Colet wrote:
beau a écrit :
I have been converting midi into keystrokes with midiStroke for OS X
http://www.apple.com/downloads/macosx/audio/midistroke.html
I think on windows people are using: http://www.midiox.com/
It would be great it pd could do this!
midiox program converts Keystrokes to MIDI Notes, it doesn't emulate keystrokes.
There might be a trick to do this with macosx API ,like I did with windows API in [winkey]?
PureData can do this on linux and now on windows with the help of different externals. I bet many users would love to have a single external for both platforms, that uses the same parameters, same help file, the object would have then the same name, it wouldn't be x11key anymore but [keystroke] or something like this and would work on most platforms. Aalex, what do you think?
Sounds like a great idea. How about something like [send_key] or
[type_key]?
.hc
Mistrust authority - promote decentralization. - the hacker ethic
Hans-Christoph Steiner a écrit :
On Dec 16, 2007, at 5:32 PM, Patrice Colet wrote:
beau a écrit :
I have been converting midi into keystrokes with midiStroke for OS X
http://www.apple.com/downloads/macosx/audio/midistroke.html
I think on windows people are using: http://www.midiox.com/
It would be great it pd could do this!
midiox program converts Keystrokes to MIDI Notes, it doesn't emulate keystrokes.
There might be a trick to do this with macosx API ,like I did with windows API in [winkey]?
PureData can do this on linux and now on windows with the help of different externals. I bet many users would love to have a single external for both platforms, that uses the same parameters, same help file, the object would have then the same name, it wouldn't be x11key anymore but [keystroke] or something like this and would work on most platforms. Aalex, what do you think?
Sounds like a great idea. How about something like [send_key] or [type_key]?
.hc
[send_key] sounds good, also I might have found how to do this on MAC OS X, by the use of sysctl.h, with looking at the source of some programs that emulates keystrokes, but I haven't got the machine for testing...
Tried the external you sent Patrice. Thanks it works great. Thinking if I have a chance some time I'll add the code so you can just send an ascii character into it. I think I saw a window function that converts a character to the code your external takes. Anyway as it stands now its great so thanks a lot : ) Jim On Mon, 2007-12-17 at 08:19 +0100, Patrice Colet wrote:
Hans-Christoph Steiner a écrit :
On Dec 16, 2007, at 5:32 PM, Patrice Colet wrote:
beau a écrit :
I have been converting midi into keystrokes with midiStroke for OS X
http://www.apple.com/downloads/macosx/audio/midistroke.html
I think on windows people are using: http://www.midiox.com/
It would be great it pd could do this!
midiox program converts Keystrokes to MIDI Notes, it doesn't emulate keystrokes.
There might be a trick to do this with macosx API ,like I did with windows API in [winkey]?
PureData can do this on linux and now on windows with the help of different externals. I bet many users would love to have a single external for both platforms, that uses the same parameters, same help file, the object would have then the same name, it wouldn't be x11key anymore but [keystroke] or something like this and would work on most platforms. Aalex, what do you think?
Sounds like a great idea. How about something like [send_key] or [type_key]?
.hc
[send_key] sounds good, also I might have found how to do this on MAC OS X, by the use of sysctl.h, with looking at the source of some programs that emulates keystrokes, but I haven't got the machine for testing...
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
jim ruxton a écrit :
Tried the external you sent Patrice. Thanks it works great. Thinking if I have a chance some time I'll add the code so you can just send an ascii character into it. I think I saw a window function that converts a character to the code your external takes. Anyway as it stands now its great so thanks a lot : ) Jim
I am happy that this satisfies your need, it's my first external, this topic was a good enough for making a try.
In the other external I've called [keystroke], it fixes a major bug found in the other one I've called [winkey] that could crash the machine, and there is some documentation inside keystroke-help.pd about the relationship between the number to enter and the correponding key. You can also get this in msdn site.
The numbers doesn't always correspond with the good keys, could you help me about this, and give me which numbers are working with your windows version?
Maybe it would have been better to use SendInput() rather than kbd_event(), but I haven't been able to figure out how to use the first.
We hope to make soon a cross-platform external, but keeping the number option for the windows version should be handy. I'm just wondering if the arguments for the objects should be the same on all platforms (lot of work), or different arguments following the API (it seem simple to do).
jim ruxton a écrit :
Tried the external you sent Patrice. Thanks it works great. Thinking if I have a chance some time I'll add the code so you can just send an ascii character into it. I think I saw a window function that converts a character to the code your external takes. Anyway as it stands now its great so thanks a lot : ) Jim
I am happy that this satisfies your need, it's my first external, this topic was a good enough for making a try.
In the other external I've called [keystroke], it fixes a major bug found in the other one I've called [winkey] that could crash the machine, and there is some documentation inside keystroke-help.pd about the relationship between the number to enter and the correponding key. You can also get this in msdn site.
The numbers doesn't always correspond with the good keys, could you help me about this, and give me which numbers are working with your windows version?
I'll have a look at this. Right now I am not using very many keys and they all seemed to work. spell from cyclone is useful in doing keyboard type patches. It takes text and converts a string to the ascii values. I had to use upper case characters since your external only accepts upper case ascii values since that is how the key codes are defined. I didn't want to get fancy yet and use shift etc. I think it would be great to create an external that takes ascii characters directly. I think you can then use vkkeyscan to convert to the key codes which your external takes.
Maybe it would have been better to use SendInput() rather than kbd_event(), but I haven't been able to figure out how to use the first.
Have you looked at sendkeys . This could simpliy things as well. http://msdn2.microsoft.com/en-us/library/8c6yea83.aspx
We hope to make soon a cross-platform external, but keeping the number option for the windows version should be handy. I'm just wondering if the arguments for the objects should be the same on all platforms (lot of work), or different arguments following the API (it seem simple to do).
I could work with either. I wonder is there is a way to direct the keypress to the desired window (program) . Currently the cursur has to be in the window where you want to recieve keypresses. Maybe using the SetFocus http://msdn2.microsoft.com/en-us/library/ms646312(VS.85).aspx or SetActiveWindow function you could direct the keyboard input to the desired application? I can see that the feature request is growing : ) . Congrats on writng your first external. I have yet to tackle one.
Jim
This is great ! Now, we need the mac part of it, and then standardize it (ASCII + special keys), put the code together and make it portable. :)
[keypress] sounds nicer, I find.
a
2007/12/19, jim ruxton cinetron@passport.ca:
jim ruxton a écrit :
Tried the external you sent Patrice. Thanks it works great. Thinking if I have a chance some time I'll add the code so you can just send an ascii character into it. I think I saw a window function that converts a character to the code your external takes. Anyway as it stands now its great so thanks a lot : ) Jim
I am happy that this satisfies your need, it's my first external, this topic was a good enough for making a try.
In the other external I've called [keystroke], it fixes a major bug found in the other one I've called [winkey] that could crash the machine, and there is some documentation inside keystroke-help.pd about the relationship between the number to enter and the correponding key. You can also get this in msdn site.
The numbers doesn't always correspond with the good keys, could you help me about this, and give me which numbers are working with your windows version?
I'll have a look at this. Right now I am not using very many keys and they all seemed to work. spell from cyclone is useful in doing keyboard type patches. It takes text and converts a string to the ascii values. I had to use upper case characters since your external only accepts upper case ascii values since that is how the key codes are defined. I didn't want to get fancy yet and use shift etc. I think it would be great to create an external that takes ascii characters directly. I think you can then use vkkeyscan to convert to the key codes which your external takes.
Maybe it would have been better to use SendInput() rather than kbd_event(), but I haven't been able to figure out how to use the first.
Have you looked at sendkeys . This could simpliy things as well. http://msdn2.microsoft.com/en-us/library/8c6yea83.aspx
We hope to make soon a cross-platform external, but keeping the number option for the windows version should be handy. I'm just wondering if the arguments for the objects should be the same on all platforms (lot of work), or different arguments following the API (it seem simple to do).
I could work with either. I wonder is there is a way to direct the keypress to the desired window (program) . Currently the cursur has to be in the window where you want to recieve keypresses. Maybe using the SetFocus http://msdn2.microsoft.com/en-us/library/ms646312(VS.85).aspx or SetActiveWindow function you could direct the keyboard input to the desired application? I can see that the feature request is growing : ) . Congrats on writng your first external. I have yet to tackle one.
Jim
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
jim ruxton a écrit :
type patches. It takes text and converts a string to the ascii values. I had to use upper case characters since your external only accepts upper case ascii values since that is how the key codes are defined. I didn't want to get fancy yet and use shift etc. I think it would be great to create an external that takes ascii characters directly. I think you can then use vkkeyscan to convert to the key codes which your external takes.
Maybe it would have been better to use SendInput() rather than kbd_event(), but I haven't been able to figure out how to use the first.
Have you looked at sendkeys . This could simpliy things as well. http://msdn2.microsoft.com/en-us/library/8c6yea83.aspx
This method looks far better, thank you, I'll try to use it...
I could work with either. I wonder is there is a way to direct the keypress to the desired window (program) . Currently the cursur has to be in the window where you want to recieve keypresses. Maybe using the SetFocus http://msdn2.microsoft.com/en-us/library/ms646312(VS.85).aspx or SetActiveWindow function you could direct the keyboard input to the desired application? I can see that the feature request is growing : ) .
SetFocus() is interesting, and would be used with a bunch of other methods like GetWindow(), GetChildWindows(), for choosing which windows will be focused. Now I'd be interested to know how to do it with X11.
On Dec 16, 2007, at 11:19 PM, Patrice Colet wrote:
Hans-Christoph Steiner a écrit :
On Dec 16, 2007, at 5:32 PM, Patrice Colet wrote:
beau a écrit :
I have been converting midi into keystrokes with midiStroke for
OS Xhttp://www.apple.com/downloads/macosx/audio/midistroke.html
I think on windows people are using: http://www.midiox.com/
It would be great it pd could do this!
midiox program converts Keystrokes to MIDI Notes, it doesn't
emulate keystrokes.There might be a trick to do this with macosx API ,like I did with windows API in [winkey]?
PureData can do this on linux and now on windows with the help of different externals. I bet many users would love to have a single external for both platforms, that uses the same parameters, same help file, the object would have then the same name, it wouldn't be x11key anymore but [keystroke] or something like this and would work on most platforms. Aalex, what do you think?
Sounds like a great idea. How about something like [send_key] or
[type_key]? .hc[send_key] sounds good, also I might have found how to do this on
MAC OS X, by the use of sysctl.h, with looking at the source of
some programs that emulates keystrokes, but I haven't got the
machine for testing...
Post the example code and someone will probably look at it. If it is
easy, I'll do it, especially if there is already a cross-platform
object written.
Also, [hid] and [hidio] both have a cross-platform event/message
scheme that is translated into the native platform messages. I think
for [send_key] it use an existing scheme, like from [key]/[keyup]/
[keyname] or [hidio].
.hc
.hc
Access to computers should be unlimited and total. - the hacker ethic
Hello,
Hans-Christoph Steiner a écrit :
On Dec 16, 2007, at 11:19 PM, Patrice Colet wrote:
Hans-Christoph Steiner a écrit :
PureData can do this on linux and now on windows with the help of different externals. I bet many users would love to have a single external for both platforms, that uses the same parameters, same help file, the object would have then the same name, it wouldn't be x11key anymore but [keystroke] or something like this and would work on most platforms. Aalex, what do you think?
Sounds like a great idea. How about something like [send_key] or [type_key]? .hc
[send_key] sounds good, also I might have found how to do this on MAC OS X, by the use of sysctl.h, with looking at the source of some programs that emulates keystrokes, but I haven't got the machine for testing...
Post the example code and someone will probably look at it. If it is easy, I'll do it, especially if there is already a cross-platform object written.
Also, [hid] and [hidio] both have a cross-platform event/message scheme that is translated into the native platform messages. I think for [send_key] it use an existing scheme, like from [key]/[keyup]/[keyname] or [hidio].
I'd like to make a proposition with this attached object in construction, it uses different fonctions that ease handling to a window with EnumWindow() and FindWindow() function. The user will only have to know the first characters of the window to handle, also a list of all visible windows can be printed into the console. We can send a character or a character chain, but puredata will drop some keycodes if it's sent through a message box. Now I need to find out how to do the same thing with X11, then it will be possible to have a single external with the same functions.
Best. PC.
On May 20, 2008, at 4:00 PM, Patrice Colet wrote:
Hello,
Hans-Christoph Steiner a écrit :
On Dec 16, 2007, at 11:19 PM, Patrice Colet wrote:
Hans-Christoph Steiner a écrit :
PureData can do this on linux and now on windows with the help of different externals. I bet many users would love to have a single external for both platforms, that uses the same parameters, same help file, the
object would have then the same name, it wouldn't be x11key anymore but [keystroke] or something like this and would work on most
platforms. Aalex, what do you think?Sounds like a great idea. How about something like [send_key]
or [type_key]? .hc[send_key] sounds good, also I might have found how to do this on
MAC OS X, by the use of sysctl.h, with looking at the source
of some programs that emulates keystrokes, but I haven't got the
machine for testing...Post the example code and someone will probably look at it. If it
is easy, I'll do it, especially if there is already a cross- platform object written. Also, [hid] and [hidio] both have a cross-platform event/message
scheme that is translated into the native platform messages. I
think for [send_key] it use an existing scheme, like from [key]/ [keyup]/[keyname] or [hidio].I'd like to make a proposition with this attached object in
construction, it uses different fonctions that ease handling to a
window with EnumWindow() and FindWindow() function. The user will only have to know the first characters of the window
to handle, also a list of all visible windows can be printed into
the console. We can send a character or a character chain, but puredata will
drop some keycodes if it's sent through a message box. Now I need to find out how to do the same thing with X11, then it
will be possible to have a single external with the same functions.Best. PC.<sendkey.zip>
Cool, that would be a handy objectclass to have cross-platform. The
X11 version of this was posted on the list a while back, I think it
was called x11key from Alexandre Quessy. I haven't seen the Mac OS X
version of this though...
.hc
Terrorism is not an enemy. It cannot be defeated. It's a tactic.
It's about as sensible to say we declare war on night attacks and
expect we're going to win that war. We're not going to win the war
on terrorism. - retired U.S. Army general, William Odom
On Dec 16, 2007, at 12:57 AM, Patrice Colet wrote:
Patrice Colet a écrit :
Thanks Roman, I'm working on Linux and sometimes forced to use Windows so I
would be looking for a solution in both. I'll have a look at aalex. Anyone
know of a Windows solution? JimWith VkKeyScan() function http://msdn2.microsoft.com/en-us/library/ms646329.aspx
keybd_event() seems to be more suitable, is this attached external
provide what you need? I might try also to give [winkey] the same behavior as [x11key]
for having a compatible external, for the moment it was simplier
for me to use ascii character strings for sending key
strokes.<winkey.rar>_______________________________________________ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
Sounds like a useful thing. It would be very useful to have a cross-
platform object for doing this, with all the messages and output the
same. We just need a Mac OS X implementation to fill it in.
.hc
Using ReBirth is like trying to play an 808 with a long stick. - David Zicarelli
Hans-Christoph Steiner a écrit :
On Dec 16, 2007, at 12:57 AM, Patrice Colet wrote:
Patrice Colet a écrit :
Thanks Roman, I'm working on Linux and sometimes forced to use Windows so I would be looking for a solution in both. I'll have a look at aalex. Anyone know of a Windows solution? Jim
With VkKeyScan() function http://msdn2.microsoft.com/en-us/library/ms646329.aspx
keybd_event() seems to be more suitable, is this attached external provide what you need? I might try also to give [winkey] the same behavior as [x11key] for having a compatible external, for the moment it was simplier for me to use ascii character strings for sending key strokes.<winkey.rar>_______________________________________________ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Sounds like a useful thing. It would be very useful to have a cross-platform object for doing this, with all the messages and output the same. We just need a Mac OS X implementation to fill it in.
.hc
For using the same messages and outputs, we might need headers for mapping the corresponding API messages, and define how it's going to work for special cases like CAP LOCK or SCROLL LOCK.
You need to have permission to read the /dev/input/event* devices.
By default, you do not have permission on GNU/Linux. Check the
archives for this list for more on that topic.
.hc
On Dec 14, 2007, at 6:22 PM, jean-martin barbut wrote:
Hi,
I'm trying to use [hid] tu retrieve joystick infos on a linux box (Ubuntu Studio 7.10) : no joystick recognition. On Mac, if I click on the "print" msg box, I have a list of all devices available. On linux clicking on "print" doesn't list anything. My joystick is installed properly because I can use it with the [pd_joystick] extra.
Why dont I just use [pd_joystick] ? Because I need to use 2 joysticks and only the first one is recognized on [pd_joystick]...
Other thing : if you forget to put the toggle box to off when you
select another device number, pd-extended (0.39) just close (brutally...).Regards,
Jean-Martin (esox)
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
All mankind is of one author, and is one volume; when one man dies,
one chapter is not torn out of the book, but translated into a better
language; and every chapter must be so translated.... -John Donne