Implementing Keyboard Shortcuts

DSP related issues, mathematics, processing and techniques
Post Reply
User avatar
SBMastering
Posts: 17
Joined: Tue Jun 12, 2012 11:47 pm

Implementing Keyboard Shortcuts

Post by SBMastering »

I'm working on a concept right now and it really needs to use a keyboard shortcut.

I'm posting a screecap of what I tried. I got it to work right there in Flowstone/Synthmaker, but when I exported to VST it did not work in the host (Samplitude).

I most of all would like it to work with the "0" button on the keyboard's numpad.

Anyone know of a way to make this work?

Any help would be VERY appreciated.
Attachments
Keyboard Shortcut Module.jpg
Keyboard Shortcut Module.jpg (50.63 KiB) Viewed 19922 times
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: Implementing Keyboard Shortcuts

Post by Nubeat7 »

hmm, im using shortcuts too, works fine here, (cubase, renoise) maybe the "0" is also used by the host?
http://msdn.microsoft.com/en-us/library ... 25(v=vs.60).aspx
here you can find all key code constants - for 0 in numpad it should be "vbKeyNumpad0"
philton
Posts: 25
Joined: Fri Nov 02, 2012 5:30 am

Re: Implementing Keyboard Shortcuts

Post by philton »

SBMastering wrote:I'm working on a concept right now and it really needs to use a keyboard shortcut.

I'm posting a screecap of what I tried. I got it to work right there in Flowstone/Synthmaker, but when I exported to VST it did not work in the host (Samplitude).

I most of all would like it to work with the "0" button on the keyboard's numpad.

Anyone know of a way to make this work?

Any help would be VERY appreciated.



maybe usefull for you: viewtopic.php?f=3&t=933
User avatar
SBMastering
Posts: 17
Joined: Tue Jun 12, 2012 11:47 pm

Re: Implementing Keyboard Shortcuts

Post by SBMastering »

Both of you have been a tremendous help, thank you.

It took a little bit of doing and figuring out, but now it's working -- a keyboard shortcut/hotkey sends out a boolean and manipulates a switch.

The only problem is that if you work the switch the the mouse and then work it with the numpad "0" key, sometimes you have to press the key twice to get it to switch again. This is the only bug I can't seem to fix. Click a bit, then press the "0" button on the numpad a bit and you'll see it slip up.

I'm posting a FSM of the Keyboard Shortcut module and the Toggle Switch as a tiny contribution. It's formatted to be very easy to work with.

I put a list of the key codes in the Keyboard Shortcut module to make them easy to reference.

If anyone wants to take a crack at fixing the bug, please have at it.
Attachments
Keyboard Shortcut and Switch.fsm
(9.42 KiB) Downloaded 1467 times
philton
Posts: 25
Joined: Fri Nov 02, 2012 5:30 am

Re: Implementing Keyboard Shortcuts

Post by philton »

i hope this is what you are looking for... :|

Keyboard Shortcut and Switch fixed phil.fsm
fixed
(11.2 KiB) Downloaded 1533 times
Post Reply