Keyboard custom keys

Hello everyone,

I have a keyboard with several custom keys on it and I'm wondering if it's possible to use them somehow on FreeBSD. Tried out x11/xev but it does not detect any of the extra keys sadly. Being fairly new to FreeBSD I'm out of ideas, but maybe someone else can help?

Regards,
Daniel
 
I'd like to use those too and it would be nice to do without a DE. However, I'm using KDE at the moment and there are settings in there. After years of using a standard model M, I'm currently using a keyboard with a couple of those so called "Win" keys. System settings -> Input Devices -> Keyboard settings -> Advanced.
 
There are probably many solutions, here is mine.

I use a standard French keyboard but I also need Spanish characters from time to time in my work (ñ,ó,í and the like). I have made them available using port x11/xmodmap and a pair of custom ~/.Xmodmap and ~/.Xmodmap-nondefaults files. To create these files easily you may want to have a look at port x11/xkeycaps, which is essentially a graphical front-end to xmodmap.

As said before there is probably more than one solution, and I'm not sure this is the best. But I'm using it for many years without any problems (installed once and forgotten since), so it may help you too.
 
There are several varieties of extra keys. The Windows keys on a normal PC keyboard can be programmed. I used to do that in ~/.xinitrc:
Code:
xmodmap -e "keycode 115 = Left" -e "keycode 116 = Left"
That sets both of the Windows keys to be a left arrow, making Alt-Windows an alias for Alt-Left, an easy keystroke for going back a level in a browser. Now I use the Customizable Shortcuts add-on for Firefox.

For console use, a keymap file can be customized. See kbdmap(5), and look in /usr/share/syscons/keymaps for existing keymaps.

USB keyboards with lots of extra keys usually implement those extra keys as a separate HID device. Those don't come in through the keyboard device, and must be handled separately with usbhidaction(1). I showed doing that with a USB foot pedal here: Thread 41439.
 
Thanks for the replies! I will definitely try them out, once I have a little free time.
 
Back
Top