If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Isolating keypresses
4 posts
• Page 1 of 1
Isolating keypresses
hi all
It's possible to "capture" the keyboard same way we capture the mouse?
Details:
Trying something with the isKeyPressed primitive I found that if the key matches any of the shortcuts of FS3 ( you know, "z" for trigger button, "f" for float"), the keypress is correctly detected but it also tries to get the corresponding item from toolbox. NOt tested but I suspect same happend whith the isKeyPress ruby call
An once I started to ask. Why that doesn't happen when you use the PC Keyboard Midi In ?
Is there anyway to forbid that ?
It's possible to "capture" the keyboard same way we capture the mouse?
Details:
Trying something with the isKeyPressed primitive I found that if the key matches any of the shortcuts of FS3 ( you know, "z" for trigger button, "f" for float"), the keypress is correctly detected but it also tries to get the corresponding item from toolbox. NOt tested but I suspect same happend whith the isKeyPress ruby call
An once I started to ask. Why that doesn't happen when you use the PC Keyboard Midi In ?
Is there anyway to forbid that ?
Free your memory, .. with a free(). Like a pointer
Cast a pointer into an integer and it becomes the integer...
Cast a pointer into a struct and it becomes the struct...
A pointer can overflow... or can crash...
Be a pointer my friend
Cast a pointer into an integer and it becomes the integer...
Cast a pointer into a struct and it becomes the struct...
A pointer can overflow... or can crash...
Be a pointer my friend
- unkargherth
- Posts: 29
- Joined: Fri Apr 08, 2005 9:46 pm
Re: Isolating keypresses
Yes, this has long been the behaviour in SM too.
Turning on MIDI keys works differently because it is actually receiving the keypress events direct from Windows. The isKeyPressed doesn't receive these events, it just polls the current state only when you ask it to. As you suspect, the Ruby call is the same.
It would be great to have a way to receive these events properly - and the mouse-wheel uses a similar events system, so maybe that could be added too. You'd need on/off toggles in the menus for them too, because you probably wouldn't want them switched on all the time while editing.
Turning on MIDI keys works differently because it is actually receiving the keypress events direct from Windows. The isKeyPressed doesn't receive these events, it just polls the current state only when you ask it to. As you suspect, the Ruby call is the same.
It would be great to have a way to receive these events properly - and the mouse-wheel uses a similar events system, so maybe that could be added too. You'd need on/off toggles in the menus for them too, because you probably wouldn't want them switched on all the time while editing.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Isolating keypresses
[Enter] key works for toggling the Keyboard-MIDI input.trogluddite wrote:You'd need on/off toggles in the menus for them too, because you probably wouldn't want them switched on all the time while editing.
- infuzion
- Posts: 109
- Joined: Tue Jul 13, 2010 11:55 am
- Location: Kansas City, USA, Earth, Sol
Re: Isolating keypresses
infuzion wrote:[Enter] key works for toggling the Keyboard-MIDI input.
He he, all this time using SM, and I never noticed that!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 17 guests