[SOLVED] Key Mapping

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Pedro Laia
Level 2
Level 2
Posts: 54
Joined: Tue Jul 05, 2022 11:05 am

[SOLVED] Key Mapping

Post by Pedro Laia »

Hello...
I'm new to Linux :)
I wanted to change two keys in my keyboard, I installed "Input Remapper" but I'm not been able to change the keys :(
I wanted to change the key "º" to "~" and vice-versa.
My keyboard layout is in portuguese.
Is it better to use this app or is it better other solution ?
Thanks !
Last edited by LockBot on Thu Jan 05, 2023 11:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
magnus7
Level 4
Level 4
Posts: 359
Joined: Sat Jan 30, 2016 8:46 pm

Re: Key Mapping

Post by magnus7 »

Run this command in terminal and restart the computer:

Code: Select all

sudo sed -i \
-e '15s|.*|key<BKSL>{[masculine,dead_circumflex,dead_grave,dead_breve]};|' \
-e '18s|.*|key<AC11>{[dead_tilde,ordfeminine,dead_circumflex,dead_caron]};|' \
/usr/share/X11/xkb/symbols/pt && sudo dpkg-reconfigure xkb-data
Pedro Laia
Level 2
Level 2
Posts: 54
Joined: Tue Jul 05, 2022 11:05 am

Re: Key Mapping

Post by Pedro Laia »

Worked :)
Thank you very much !
Can you point me a book to start learning what you did ?
magnus7
Level 4
Level 4
Posts: 359
Joined: Sat Jan 30, 2016 8:46 pm

Re: Key Mapping

Post by magnus7 »

It is X Keyboard Extension. If you're interested how it works search for "xkb", starting with this website: http://www.x.org/wiki/XKB/
Pedro Laia
Level 2
Level 2
Posts: 54
Joined: Tue Jul 05, 2022 11:05 am

Re: Key Mapping

Post by Pedro Laia »

Gracias :)
Pedro Laia
Level 2
Level 2
Posts: 54
Joined: Tue Jul 05, 2022 11:05 am

Re: Key Mapping

Post by Pedro Laia »

magnus7 wrote: Thu Jul 07, 2022 8:40 am It is X Keyboard Extension. If you're interested how it works search for "xkb", starting with this website: http://www.x.org/wiki/XKB/
I'm sorry, but how do I revert this ? I had to change the keyboard, since I wasn't able to adjust to it, it had many faults, and now the new one is "normal" and it doesn't have this weird layout.

Sorry for the trouble.
magnus7
Level 4
Level 4
Posts: 359
Joined: Sat Jan 30, 2016 8:46 pm

Re: [SOLVED] Key Mapping

Post by magnus7 »

Reinstall xkb-data package. Run this command in terminal and restart the computer:

Code: Select all

sudo apt-get install --reinstall xkb-data
Pedro Laia
Level 2
Level 2
Posts: 54
Joined: Tue Jul 05, 2022 11:05 am

Re: [SOLVED] Key Mapping

Post by Pedro Laia »

magnus7 wrote: Sun Jul 10, 2022 7:08 am Reinstall xkb-data package. Run this command in terminal and restart the computer:

Code: Select all

sudo apt-get install --reinstall xkb-data
Done ! Thanks for all the help !
Locked

Return to “Software & Applications”