Score:0

How to map an action to a list of keycodes with xmodmap?

in flag

I'm using ubuntu 20.04 on a MSI laptop.

The problem that I found is relative to the keys that can be used with the fn e.g. the key fn+f3 should disable the touchpad.

In the system settings if I try to create a normal custom shortcut and I press f3 it is recognized, but if I press fn+f3 I don't get anything, practically the system is not recognizing it as a key.

I know that I can use xmodmap to change the mapping of keycodes to keys. The problem with that is that if I use the command showkey -s and I press the fn+f3 I get the code 0x1d 0xe0 0x5b 0x76 0x9d 0xe0 0xdb 0xf6 and if I do that without the -s option I get the following output.

keycode  29 press
keycode 125 press
keycode  85 press
keycode  29 release
keycode 125 release
keycode  85 release

I would like to know if there exists a way to map this combo as a command for the system.

If it can be useful this is the output from xev -event keyboard

KeyPress event, serial 28, synthetic NO, window 0x6c00001,
    root 0x296, subw 0x0, time 20618498, (106,394), root:(1848,468),
    state 0x14, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x6c00001,
    root 0x296, subw 0x0, time 20618499, (106,394), root:(1848,468),
    state 0x54, keycode 93 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x6c00001,
    root 0x296, subw 0x0, time 20618502, (106,394), root:(1848,468),
    state 0x54, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x6c00001,
    root 0x296, subw 0x0, time 20618506, (106,394), root:(1848,468),
    state 0x50, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x6c00001,
    root 0x296, subw 0x0, time 20618509, (106,394), root:(1848,468),
    state 0x10, keycode 93 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.