Closed Moanrisy closed 4 years ago
Hi, yes you'll need to add a like like this one:
https://github.com/kbingham/xhk/blob/cb19c87abc2150ba2df3811e43eccc25c85a7b4b/src/xhk.c#L245
if(keycode >= KEY_1 && keycode <= KEY_0) t = KEY_1;
But you'll need it to map to KEY _F1 so :
if(keycode >= KEY_F1 && keycode <= KEY_10) t = KEY_F1; // functions
But xhk-layout.h s does not define the values of those KEY _F1,2,3... yet.
I think from memory they are standard X key values, but I can't remember for sure.
I think of you run xhk with debug enabled it will print the keycodes, or you can get them from the xinput libraries.
If you can find the right header in Xinput, we should really include that rather than redefining them ourselves.
I think you can get the codes from running either showkey or xev too
Thank you very much, it's working.
for future reference, maybe someone want to edit too
Feel free to submit a patch for this if you like :-)
Feel free to submit a patch for this if you like :-)
I will try to make PR on this weekend, I will update README about
and I will try to make PR for 4 new keys SQUARE key [, close SQUARE key ], equal plus =+, and apostrophe key I map F1-F4 from the highest priority key when used on typing. F1 > '" (I map this for F1 because people casually use apostrophe when typing common text) F2 > [{ (for coding) F3 > ]} (for coding) F4 > =+ (maybe someone use this key)
I wonder If I can change =+ button, [{ button, ]} button, '" button with F1, F2, F3, F4.
From what i'm read from the src folder, there is 2 file. 1 is to enum number with button. from 9 to 66. so If I want to use, (=+, [{, }], '") and (f1, f2, f3, f4) what number should I use?
from method mirror_key() /****
where I can find his keycode?