Multiple keyboards work just fine (for example you can use your laptop keyboard + an external USB one). The “problem” is they all share the same keybaord layout, so you can’t have french azerty on the laptop + spanish qwerty on the external keyboard, for example.
The problem with media keys is simply that the keycodes are not mapped to anything and I think they are not accessible at all in our keymap files. We should add this, and it should not be a very difficult change.
Nope. I mean situation when one physical KB represented as multiple KBs.
Currently addon works just fine, 'cause I’m using B_UNMAPPED_KEY_DOWN .
The trouble of Giova is that on his KB this event not raises nor returns nothing — see testing utility on same repo.
I think I’ve done my best with addon and if we want something better, we must start with desklink — at least it need command line args to change volume level.
I’ve tried, but got fail. When I’ll have another free time, I’ll start again.
This turned out to be a completely different issue that just happened to appear at the same time.
However, the utility doesn’t work for me. When I use the utilty to get key presses, nothing happens when I press the volume up/down keys (accessed through fn+F3/F4 on my laptop)
Thank you guys, when I’ll find a little time, I’ll dig into it.
In other hand, I’m C++ (and Haiku API too) newbie, so errors can be caused by me.
Currently all works on my PC with Microsoft Keyboard 2000, so it’s little hard to find fault point.
I updated utility for getting keycodes, so please try anain.
Just run it (after dowload or fetching+compilation), press media keys and write codes there.
I hope this will help us with addon, 'cause without right keycodes for your KBs I was unable to make it working.
Вообще отдельная клава - Logitech K330
Вот коды что выдаёт та утилитка
Левый верх клавы
Верхняя строка 93 первая левая кнопка
Верхняя строка 786827 почтовый клиент
Верхняя строка 786980 кнопка домик
Верхняя строка 786820 кнопка музыкальный значок - плеер
Верхняя строка 102, нижняя 62 кнопка - свернуть окна
Правый верх клавы
Верхняя строка 786615 предыдущая дорожка
Верхняя строка 786638 пауза\играть
Верхняя строка 786614 следуйщая дорожка
Верхняя строка 786659 полностью выключить кромкость
Верхняя строка 786667 - громкость
Верхняя строка 786666 + громкость
Верхняя строка 786835 кнопка калькулятор над нампадом
FN + F5 = верхняя строка 786978
FN + F6 = верхняя строка 102, нижняя строка 68
FN + F7 = верхняя строка 102, нижняя строка 41
FN + F8 = не меняется, на ней значок выключить пк
FN + PrintScreen = верхняя строка 104 меню нарисовано, открывается кнопка на Deskbar
FN + Pause Break = нижняя строка 15 стрелочка скачать, или загрузки
Thank you BeRUS for keycodes. Currently I need only volume control ones.
Looks like no one uses USB-HID standard codes — 127-129. MS (for my MS 2000) uses 786658, 786665 and 786666, while your keyboard using 786659, 786666 and 786667.
I can’t simply put them all into code, a switcher needed.
That’s strange. Under Windows all keyboards works same even under generic drivers — but how it can be if codes are different?
Maybe bug inside Haiku input_server?
If I have enough time I’ll give this a try tomorrow but I have a laptop and I don’t know what my keyboard model is, can I send you my laptop model instead? It also has other media keys: previous, play/pause, stop and next. Will information about those be useful too? Oops, I just saw your previous comment, you don’t need those.
I could not test it today, sorry but I want to test it as soon as possible, I need to make my media keys work.
Side note: as already stated by others, the input filter addon is in this case superfluous, media apps can catch the new key codes, or users can use Shortcuts.
Well, it’s a mapping table:
kKeyTable[4] => 0x3c
0x3c is the Haiku raw key code for the key A.
You can check numbers at the top of any keymap file in src/data/keymaps/.