kometbomb / klystrack

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

Missing notes on Azerty keymap #79

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.use the AZERTY keymap
2.can't use the 2 3 5 6 7   9 0 keys

What is the expected output? What do you see instead?
When using the AZERTY keymap, the keys for 2 3 5 (etc) are "é", """ and "(" 
(etc.), so we can't access sharp notes.

What version of the product are you using? On what operating system?
1.5.4 r1071, on Linux

Please provide any additional information below.

At the moment, the temporary workaround is to use the DEFAULT keymap, and 
change my key layout to US while using klystrack, with the command "setxkbmap 
us"

Original issue reported on code.google.com by eforg...@gmail.com on 1 Nov 2011 at 10:08

GoogleCodeExporter commented 9 years ago

Original comment by kometb...@gmail.com on 24 Dec 2011 at 5:26

GoogleCodeExporter commented 9 years ago
Support for all Latin-1 characters (K_WORLD_*) has now been added to the 
keymapper. This means the sharp keys have to be keymapped to K_2, K_3 etc.

However, it is unknown to me what the scancodes for é and other AZERTY "sharp 
note" keys are. I need to research further to produce the actual mapping. 

Original comment by kometb...@gmail.com on 29 Apr 2012 at 8:04

Gomme- commented 9 years ago

The number keys at the top of my keyboard don't work. I try to use the KWORLD* suggested here, it didn't work (not sure if i understand how to use it properly), and i try to change my keyboard layout in my system to US (system : linux mint 17.1 Cinnamon 64-bit) didn't either.

kometbomb commented 9 years ago

@Gomme-: I think the KWORLD* keys are missing at the moment (SDL 2.0 changed stuff quite a bit). I'll make a little tool for finding out the scancodes and whatnot for keypresses. It would be really nice if you could then post the scancodes here so we can see what is actually happening inside the keyboard.

kometbomb commented 9 years ago

Here you go: https://dl.dropboxusercontent.com/u/1190319/scancode.zip

You can use this tool to check the scancode and the symbol for any keypresses. Please press the key that is not working and post the results!

Edit: Oops, forgot the linux version, just extract the zip and run ./scancode

Gomme- commented 9 years ago

Here are the results : Keys corresponding to 1-2-3- ... -9-0 in qwerty (mod is always 0) "&" : scancode : 1e sym : 31 "é" : scancode : 1f sym : 32 """ : scancode : 20 sym : 33 "'" : scancode : 21 sym : 34 "(" : scancode : 22 sym : 35 "-" : scancode : 23 sym : 36 "è" : scancode : 24 sym : 37 "_" : scancode : 25 sym : 38 "ç" : scancode : 26 sym : 39 "à": scancode : 27 sym : 30

The end of the line (keys - and = between 0 and Backspace in qwerty) ")" : scancode : 2d sym : 29 "=" : scancode : 2e sym : 3d

Comma which is "m" in qwerty : "," : scancode : 10 sym : 2c

I did the test under windows as the script doesn't work on linux ("./scancode: error while loading shared libraries: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory" and i don't know how to do the link with the lib). I hope that the results are the same.

kometbomb commented 9 years ago

Ah ok, now I understand. I never thought even the number keys are different on AZERTY keyboards.

Did you try adding mappings like this?

K_AMPERSAND = K_1

That would map the "1" key so that klystrack understands it as "1" and not "&" (you can test it in the pattern note column, it should insert a note-off). I still need to add support for é, à and so on.

I'm not sure if I manage to add this to the 1.6.1 release tonight but I can of course upload a nightly with the support when I get it working.

kometbomb commented 9 years ago

Actually, it was quite easy to do. :)

So, very generally, you need to do this in the keymap file:

S_1e = K_2
S_1f = K_3

And so on. I am not 100 % sure if scancodes are the same across all AZERTY keyboards so I am a bit hesitant to add those in the map included with the program. Here is a quick test build:

https://dl.dropboxusercontent.com/u/1190319/klystrack-nightly-20150419-win32.zip

It would be really nice if you could test adding those lines in the AZERTY keymap and try if it works.

Gomme- commented 9 years ago

The mapping K_AMPERSAND = K_1 works. For the other keys there is no hurry, as i can still workaround. I just see your post, I test it right away.

Gomme- commented 9 years ago

OK, so the quick test build works like a charm. But if I try to put the line S_1e = K_2 S_1f = K_3 in my usual keymapping file (in my usual klystrack install), it doesn't work.

kometbomb commented 9 years ago

Well, yes, I added the scancode feature an hour ago so it's of course not available in the older build. :) It will be available in 1.6.1 released in a few hours.

Gomme- commented 9 years ago

Ah ok! Thank you!