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



## Abraham79 (Dec 8, 2021)

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.


----------



## Menelkir (Dec 8, 2021)

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


```
kern.evdev.rcpt_mask="12"
```

If still not work, try adding this one too:

```
hw.usb.usbhid.enable=1
```


----------



## Alain De Vos (Dec 8, 2021)

Four usefull programs : xev , wev , wshowkeys , xmodmap.


----------



## Abraham79 (Dec 8, 2021)

Alain De Vos said:


> 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?



Menelkir said:


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


I added`hw.usbhid.enable=1`; But, had not helped. `kern.evdev.rcpt_mask` is already 12.


----------



## Abraham79 (Dec 10, 2021)

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.


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


```
:~% 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.


----------



## Abraham79 (Dec 15, 2021)

`showkey` did not detect these volume keys. Running out of ideas.

```
:~% 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 (Dec 15, 2021)

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 (Dec 16, 2021)

Alain De Vos said:


> Four usefull programs : xev , wev , wshowkeys , xmodmap.


More of useful tools: libinput debug-events, evemu-record.


----------



## Abraham79 (Dec 16, 2021)

Andriy said:


> More of useful tools: libinput debug-events, evemu-record.


Did not detect these keys. 

Is there anything else to try out?


----------



## Andriy (Dec 17, 2021)

Abraham79 , try to use udbdump to see if there is any USB traffic at all when you press those keys.


----------



## Abraham79 (Dec 17, 2021)

Andriy said:


> Abraham79 , try to use udbdump to see if there is any USB traffic at all when you press those keys.


I guess the command is `usbdump`. It is also not detecting.


----------



## Andriy (Dec 18, 2021)

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 (Dec 18, 2021)

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


----------



## Abraham79 (Dec 20, 2021)

Andriy said:


> 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.
> ...


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.


----------

