Score:1

(x)Ubuntu : How Can I revert 2 keyboard keys on my laptop ? Or having same function for 2 different keys?

ar flag

I'm using a Lenovo P14s laptop and I want to the "FN" key (with is as bottom left corner) acts same as "Ctrl" key.

How can I do this ?

So far I've tried to map FN on Ctrl key like this :

I add the following line on my local .Xmodmap file :

keycode 151 = Control_L NoSymbol Control_L

Plus I've also comment the line key <I151> { [ XF86WakeUp ] }; in /usr/share/X11/xkb/symbols/inet file.

Then xev gives me :

For CTRL key :

KeyRelease event, serial 37, synthetic NO, window 0x7800001,
    root 0x97c, subw 0x0, time 5466327, (167,-13), root:(1038,462),
    state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

for FN key :

KeyRelease event, serial 37, synthetic NO, window 0x7800001,
    root 0x97c, subw 0x0, time 5498099, (164,-11), root:(1035,464),
    state 0x0, keycode 151 (keysym 0xffe3, Control_L), same_screen YES,
    XKeysymToKeycode returns keycode: 37
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

As it didn't work I've also add this line key <I151> { [ Control_L ] }; in /usr/share/X11/xkb/symbols/pc file and it didn't work neither

even when I comment key <LCTL> { [ Control_L ] };

(for each step I've deleted sudo rm -rf /var/lib/xkb/* and reboot)

For example I can assure you I type FN + C I don't copy a text as CTRL+C does... What am I doing wrong ?

Sadaharu Wakisaka avatar
pl flag
Welcome to AskUbuntu. Perhaps BIOS settings, please have a look at [this](https://support.lenovo.com/pe/en/solutions/ht074187).
clement-D avatar
ar flag
OMG thanks a lot ! That fixed my problem ! How can I mark your comment as solution ?
Sadaharu Wakisaka avatar
pl flag
You're welcome. It is not my idea and you are perhaps 1000th person asked this question and not really related to Ubuntu. Honor to be at your service.
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.