# how to make system recognize all my Fn key bindings

## pd1986

In my system, only these key bindings with Fn could work. They are Fn, F3, F4, F6, F7, F11, even in terminal. They work perfectly. 

but xev, it can recognize a little more, such as Fn+F1, F10, F12. How could I make those keys work, not only in desktop, but also in terminal? For example, pressing Fn+F1 will make the system locked in Windows. 

Also there are other key binding that the system doesn't know. They are Fn+F8, F9 which works for toggle the wifi and touchpad. How could I make system know these?

Thanks.

----------

## piotraf

Maybe this will help http://en.gentoo-wiki.com/wiki/Multimedia_Keys

----------

## pd1986

 *piotraf wrote:*   

> Maybe this will help http://en.gentoo-wiki.com/wiki/Multimedia_Keys

 

Thanks, I've tried xev and keytouch. But the problem is, they can only recognize some the key bindings, not all. for example, if I press Fn+F1, I could get the keycode from xev like "keycode 170" (just an example, not truely this number). but when I press Fn+F2, nothing happens, returns returns. So I could set functions to key bindings in Xmodmap.

----------

## pd1986

And, they don't return me any information when I press only Fn.

----------

## jrussia

You can use 'showkey' to see if the system (not just Xorg) is mapping the keys. I think there is also a message in dmesg for using setkeycodes to map keys that are unmapped. Once they are mapped systemwide, you can use xmodmap to configure what they do in Xorg.

http://www.gentoo-wiki.info/HOWTO_Use_Multimedia_Keys#Setting_up_xmodmap

----------

## pd1986

 *jrussia wrote:*   

> You can use 'showkey' to see if the system (not just Xorg) is mapping the keys. I think there is also a message in dmesg for using setkeycodes to map keys that are unmapped. Once they are mapped systemwide, you can use xmodmap to configure what they do in Xorg.
> 
> http://www.gentoo-wiki.info/HOWTO_Use_Multimedia_Keys#Setting_up_xmodmap

 

Yes I tried. Nothing returns from showkey, even run it in terminal with root account

----------

## jrussia

You might also check the kernel in Device Drivers->X86 Platform Specific Device Drivers for support for your system.

----------

## pd1986

 *jrussia wrote:*   

> You might also check the kernel in Device Drivers->X86 Platform Specific Device Drivers for support for your system.

 

Oh, in that, I choose only Toshiba Bluetooth RFKill switch support, since my laptop is Toshiba. While no other option relates to toshiba in that

----------

## jrussia

There's also Toshiba Laptop Extras (ACPI_TOSHIBA) in the same menu. If you search for it you will see the list of DEPENDS (kind of a long list.)

On the other hand, I don't know if this will help. Did you try

1) press the key combination

2) check 'dmesg tail'

3) does it have an error about the key press?

----------

## dmpogo

Some Fn key may not generate keystroke, but ACPI events.    Use acpi_listen   to see what they do.    And compile right additional ACPI driver for your laptop

(TOSHIBA_LAPTOP_EXTRAS in your case)  - it is  almost certainly needed for proper ACPI mapptings !

Once ACPI codes are confirmed to be generated,   your desktop environment will probably pick them up, or you can run acpid and write your own small scripts to handle these events

----------

## pd1986

 *dmpogo wrote:*   

> Some Fn key may not generate keystroke, but ACPI events.    Use acpi_listen   to see what they do.    And compile right additional ACPI driver for your laptop
> 
> (TOSHIBA_LAPTOP_EXTRAS in your case)  - it is  almost certainly needed for proper ACPI mapptings !
> 
> Once ACPI codes are confirmed to be generated,   your desktop environment will probably pick them up, or you can run acpid and write your own small scripts to handle these events

 

Thanks for pointing it out. However, I think the keystroke about ACPI is mostly done, as those to control the brightness, to make the system suspend or hibernate work already. Those who don't work are to toggle the wifi, touchpad, etc. These keystrokes need to be done by acpi_listen?

----------

