How to bind keys for the volume up, down and mute keys in HP 100 keyboard?

Abraham79

Active Member

Reaction score: 29
Messages: 135

I am using FreeBSD-13.0 with KDE and the keyboard is a basic model HP 100 which has just 3 extra keys - Volume Mute, Volume Down and Volume Up keys. I am wondering how to bind the above functions to these keys. Is there any HOWTOs or some lead to get this working. I tried xev, but it seems not detecting the new keys.


Screenshot_20211208_192526.png
 

Menelkir

Well-Known Member

Reaction score: 418
Messages: 359

Try adding this to your /boot/loader.conf.local:

Code:
kern.evdev.rcpt_mask="12"

If still not work, try adding this one too:
Code:
hw.usb.usbhid.enable=1
 
OP
Abraham79

Abraham79

Active Member

Reaction score: 29
Messages: 135

Four usefull programs : xev , wev , wshowkeys , xmodmap.
I tried. Sadly, Volume Up, Volume Down, Mute keys are not detected. I changed keyboard to 104 keys Generic keyboard in KDE settings. KDE offers easy way to assign shortcut keys. But, the above keys are not detecting. :( Not to keep a comparo - But, my Devuan Linux has these keys auto-configured. So, this should get working in FreeBSD too?

Try adding this to your /boot/loader.conf.local:

Code:
kern.evdev.rcpt_mask="12"

If still not work, try adding this one too:
Code:
hw.usb.usbhid.enable=1
I added hw.usbhid.enable=1; But, had not helped. kern.evdev.rcpt_mask is already 12.
 
OP
Abraham79

Abraham79

Active Member

Reaction score: 29
Messages: 135

I've read somewhere about installing sysutils/iichid to make the system detect the extra keys (Sound). But, the message I get from pkg is pkg: No packages available to install matching 'sysutils/iichid' have been found in the repositories. But, the module is available, I loaded it.

Code:
:~% dmesg | grep uhid
uhid0 on uhub4
uhid0: <SIGMACHIP USB Keyboard, class 0/0, rev 1.10/3.30, addr 4> on usbus0

Code:
:~% doas usbhidctl -f /dev/uhid0 -r
Report descriptor:
Collection type=Application page=Consumer usage=Consumer_Control
Input   rid=1 pos=0 size=16 count=1 page=Consumer usage=Unassigned Array, logical range 0..572
End collection
Collection type=Application page=Generic_Desktop usage=System_Control
Input   rid=2 pos=0 size=1 count=1 page=Generic_Desktop usage=System_Power_Down, logical range 0..1
Input   rid=2 pos=1 size=1 count=1 page=Generic_Desktop usage=System_Sleep, logical range 0..1
Input   rid=2 pos=2 size=1 count=1 page=Generic_Desktop usage=System_Wake_Up, logical range 0..1
End collection
Total   input size 3 bytes
Total  output size 0 bytes
Total feature size 0 bytes

Seems like, iichid is not helping.
 
OP
Abraham79

Abraham79

Active Member

Reaction score: 29
Messages: 135

showkey did not detect these volume keys. Running out of ideas.
Code:
:~% doas showkey --keycodes
Type any key to see the sequence it sends.
Terminate with your shell interrupt <CTL-C=ETX> or quit <FS> character.
 

Alain De Vos

Son of Beastie

Reaction score: 870
Messages: 2,826

It could be there is the need for a specific HP driver, where HP does not follow the "normal" protocol. If that's the case someone has to inverse-engineer.
 

Andriy

Member
Developer

Reaction score: 68
Messages: 71

Yes, usbdump, sorry.

If usbdump sees nothing, then the keyboard is not sending anything to the host.
It might be that the keyboard can operate in several different modes.
Report this issue to usb@f.o. You can also CC or write directly to hselasky@f.o.
Here is usually quite responsive.

P.S.
Also, double-check if you run usbdump correctly.
That is, it should capture USB packets when you press other, working keys.
 

Alain De Vos

Son of Beastie

Reaction score: 870
Messages: 2,826

I tried to search the mailinglists but could not find/search decently on hp100.
 
OP
Abraham79

Abraham79

Active Member

Reaction score: 29
Messages: 135

Yes, usbdump, sorry.

If usbdump sees nothing, then the keyboard is not sending anything to the host.
It might be that the keyboard can operate in several different modes.
Report this issue to usb@f.o. You can also CC or write directly to hselasky@f.o.
Here is usually quite responsive.

P.S.
Also, double-check if you run usbdump correctly.
That is, it should capture USB packets when you press other, working keys.
Thank you for the reply. Do I need to send any further information on this keyboard, like the output of xev in Linux (I've Devuan Linux also on this machine.) when the new keys are pressed.
 
Top