kometbomb / klystrack

A chiptune tracker
http://kometbomb.github.io/klystrack/
Other
482 stars 29 forks source link

Pressing multimedia keys on my keyboard enters B's and C's into pattern editor #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have a dell laptop :/
2. Press the "Volume Up" or "Volume Down" keys

What is the expected output?
My laptop to change volume and klystrack to ignore the keystrokes.

What do you see instead?
klystrack starts typing characters:
Vol Down: in the note area enters E-4.  In the effects/instruments area 'C'
Vol Up: in the note area enters G-4.  In the effects/instruments area 'B'
Mute: in the note area enters D#4.  In the effects/instruments area 'D'

What version of the product are you using?
v1.1.0 r221

On what operating system?
Windows Vista

Original issue reported on code.google.com by samw3office on 21 Oct 2009 at 10:07

GoogleCodeExporter commented 9 years ago

Original comment by kometb...@gmail.com on 21 Oct 2009 at 10:41

GoogleCodeExporter commented 9 years ago
Ok this will be *interesting* to fix. Those multimedia keys are extremely 
nonstandard
and translate to normal keystrokes (or not). I think some keyboards even send
multiple keystrokes. 

I don't have a multimedia keyboard (and even if I did it probably wouldn't 
behave
like yours). So, I compiled and attached a debug version that prints out the 
keyboard
data so I get some idea what to do with the extra buttons. Simply replace the
klystrack.exe you have now with the version in the attached zip, run it (a 
console
should open with the main window) and hit the volume keys (and any other key 
too if
you get similar trouble with them).

Thanks in advance :)

Original comment by kometb...@gmail.com on 21 Oct 2009 at 11:08

Attachments:

GoogleCodeExporter commented 9 years ago
Yeah, I don't really like the multimedia keyboards loaded up with buttons 
either. 
This is my laptop, however, and I've gotten really used to just hitting those 
volume
keys. My keyboard has only the three volume keys: up, down, mute.

Ok, here's the response from the debug window when i press the keys:

[DEBUG] SDL_KEYDOWN: time = 32.3 sym = 64 mod = 1000 unicode = 0 scancode = 20
[DEBUG] SDL_KEYDOWN: time = 32.8 sym = 62 mod = 1000 unicode = 0 scancode = 30
[DEBUG] SDL_KEYDOWN: time = 33.3 sym = 63 mod = 1000 unicode = 0 scancode = 2e

Those were three separate keypresses, so it doesn't appear to be sending two 
keystrokes.

Hope that helps.

Thanks!

Original comment by samw3office on 22 Oct 2009 at 1:28

GoogleCodeExporter commented 9 years ago
The Unicode code seems to be zero even though the key code indeed is B or C or 
so.
That'll make the special keys recognizable -- at least in this exact case.

Please check if the attached binary fixes the problem, it just discards all A-Z
keypressess with no Unicode translation.

Original comment by kometb...@gmail.com on 22 Oct 2009 at 11:41

Attachments:

GoogleCodeExporter commented 9 years ago
Works great, thanks again :)

Original comment by samw3office on 23 Oct 2009 at 2:49

GoogleCodeExporter commented 9 years ago

Original comment by kometb...@gmail.com on 23 Oct 2009 at 10:14