You are not logged in.

#1 2008-11-09 22:17:05

Paaskehare
Member
From: Denmark
Registered: 2008-11-09
Posts: 59
Website

How to make keymap work in terminal?

Hey, I have an unsual problem, my enter button on my laptop keyboard doesn't work, so i'm using an usb keyboard atm. but this is not very handy when i'm at school, and I actually only need the enter button for booting up and logging in to arch linux.

I tried using xmodmap to make an alias for my enter key, binding it to the Right Windows Button:

xmodmap -e "keysym Super_R = Return"

but this only works when X is started, is there any way to modify my keyboard setup so I can use my windows button in both the terminal, and in X? Thank you in advance smile

Last edited by Paaskehare (2008-11-09 22:18:35)


im.ole

Offline

#2 2008-11-10 03:40:39

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: How to make keymap work in terminal?

In X I also use xmodmap, but for the text console I had to modify the keymaps in:

/usr/share/kbd/keymaps/i386/qwerty/pt-latin1.map.gz

pt-latin1.map.gz is my kbd map, as of KEYMAP="pt-latin1" in rc.conf.

I wanted to change the binding called guillemotleft that I have no use for, to '/', so I copied pt-latin1.map.gz to
pt-latin1jp.map.gz and edited it (gunzip it if necessary, gzip it again when ready).

The difference between both files is:

< keycode  13 = guillemotleft    guillemotright
---
> keycode  13 = slash           guillemotright    guillemotleft

All I had to do now was to change in '/etc/rc.conf':  KEYMAP="pt-latin1jp"

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#3 2008-11-10 15:42:56

Paaskehare
Member
From: Denmark
Registered: 2008-11-09
Posts: 59
Website

Re: How to make keymap work in terminal?

Hey again, thank you for your answer smile

But now I have another problem, I tried using xev to detect what keycode my Windows button has, but this is, for some reason, different than the keycode in the terminal.
It tells me my keycode is 116, for Super_R, but it also tells me that my enter button has another number than defined in:
/usr/share/kbd/keymaps/i386/qwerty/dk/latin1.map.gz

Is there any way to detect the keycode for Super_R in the terminal smile ?


im.ole

Offline

#4 2008-11-10 16:20:48

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: How to make keymap work in terminal?

Paaskehare,

probably you are looking for 'showkey'.

There are two options, '-k' and '-s' that are important and explained in 'man showkey'.

The KBD driver seems to me very confusing but we have to live with it.

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#5 2008-11-10 21:28:51

Paaskehare
Member
From: Denmark
Registered: 2008-11-09
Posts: 59
Website

Re: How to make keymap work in terminal?

Thank you very much Mektub, it works like a charm now smile

My Super_R button was called 126, and Super_L is called 125 in the terminal, if anyone should ever find any use of this again, including me smile


im.ole

Offline

Board footer

Powered by FluxBB