You are not logged in.

#1 2017-08-08 20:29:51

dr1nkus
Member
Registered: 2017-05-09
Posts: 26

[SOLVED] Swap a nonworking key for an unused one

Hi again, I'm posting in this section because I still keep a backup laptop with Crunchbang 11. Due to a pet issue, the minus key (dash and underscore) has stopped working (xev returned nothing when pressing the key).
Luckily enough, my Spanish keyboard came with the cedilla (ç) which I have never EVER used.
I was wondering how to swap those keys in Openbox.
As far as I've read, xmodmap could be useful for such purpose, but my beard isn't long enough to understand how.
Any clues?

Last edited by dr1nkus (2017-08-09 21:17:23)

Offline

#2 2017-08-08 20:59:52

damo
....moderator....
Registered: 2015-08-20
Posts: 4,375

Re: [SOLVED] Swap a nonworking key for an unused one

Get the keycode for your cedilla key with

xev

There will be a line with something like (NB "<  >" is my placeholder wink )...

state 0x10, keycode <code> (keysym 0xnnnn, <name>), same_screen YES,

You need the "keycode <code>" and "<name>" for the next bit.

xmodmap -e "keycode <code> = minus underscore"

Use this command in a terminal to see if it works, and make it permanent by adding to your autostart. You can also create an xmodmap file to hold any new mapping, and call that from autostart instead, using:

xmodmap -pke > ~/.Xmodmap

autostart command:
xmodmap .Xmodmap

Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#3 2017-08-09 21:16:56

dr1nkus
Member
Registered: 2017-05-09
Posts: 26

Re: [SOLVED] Swap a nonworking key for an unused one

Thanks damo, it worked like a charm!

Now I've gotta get my pinky used to the new place ヽ(。_°)ノ

Offline

Board footer

Powered by FluxBB