You are not logged in.

#1 2014-06-11 02:16:52

kaslusimoes
Member
Registered: 2013-12-19
Posts: 51

[Solved] Can't use Alt Gr key on TTY

When I'm on the tty environment I can't type "/" because on my keyboard it is set to Alt Gr+Q and the Alt Gr key doesn't work there. However, when I'm on GNOME or Xfce the Alt Gr key functions properly.

Does anyone has any ideas? Thanks

Last edited by kaslusimoes (2014-06-11 18:10:45)

Offline

#2 2014-06-11 09:14:52

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: [Solved] Can't use Alt Gr key on TTY

Offline

#3 2014-06-11 13:06:22

kaslusimoes
Member
Registered: 2013-12-19
Posts: 51

Re: [Solved] Can't use Alt Gr key on TTY

Not quite, I guess. When I run localectl status both on Xfce and the tty it returns me this:

[kaslu@gene ~]$ localectl status
   System Locale: LANG=en_US.utf8
                  LC_NUMERIC=en_US.UTF-8
                  LC_TIME=en_US.UTF-8
                  LC_MONETARY=en_US.UTF-8
                  LC_PAPER=en_US.UTF-8
                  LC_MEASUREMENT=en_US.UTF-8
       VC Keymap: br-abnt2
      X11 Layout: br

So I guess it ain't a simple problem of changing to an specific keymap (the same keymap is set on /etc/vconsole.conf). However I'm still a noob so I might be wrong..

Offline

#4 2014-06-11 13:08:49

kaslusimoes
Member
Registered: 2013-12-19
Posts: 51

Re: [Solved] Can't use Alt Gr key on TTY

Hm I guess https://wiki.archlinux.org/index.php/Ex … board_Keys might help me. Will have a look now

Offline

#5 2014-06-11 13:45:20

kaslusimoes
Member
Registered: 2013-12-19
Posts: 51

Re: [Solved] Can't use Alt Gr key on TTY

I tried to follow https://wiki.archlinux.org/index.php/Ex … directives and created the file /usr/local/share/kbd/keymaps/personal.map with the content below because dumpkeys -l recognized altgr as a modifier name (with number 2)

keycode 100 = altgr

But when I try to run the loadkeys /usr/local/share/kbd/keymaps/personal.map I get this error:

unknown keysym 'altgr'

syntax error, unexpected ERROR, expecting EOL

Offline

#6 2014-06-11 16:05:07

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: [Solved] Can't use Alt Gr key on TTY

I am not very familiar with keyboard configuration but '/usr/share/kbd/keymaps/i386/qwerty/br-abnt2.map.gz' has at the beginning:

include "qwerty-layout"
	altgr   keycode  19 = registered
	altgr  	keycode  50 = mu               
include "linux-with-alt-and-altgr"

and '/usr/share/kbd/keymaps/i386/include/linux-with-alt-and-altgr.inc' has already at the beginning a line with:

keycode 100 = AltGr

So it seems that what you want to do is already set in the br-abnt2 map file.

In the br-abnt2 map file there is this line:

keycode  89 = slash question degree
        control         keycode  89 = Delete
        alt             keycode  89 = Meta_slash

So it seems the slash character is already available.
You should find it somewhere on the keyboard, I think.

Offline

#7 2014-06-11 18:09:28

kaslusimoes
Member
Registered: 2013-12-19
Posts: 51

Re: [Solved] Can't use Alt Gr key on TTY

Thanks to your help I set '/usr/local/share/kbd/keymaps/personal.map' as shown below and it worked properly on the tty. Thank you!

include "linux-keys-bare"
keycode 100 = AltGr
alt keycode 100 = Compose
altgr keycode 16 = slash

I guess I don't need that 3rd line but I'll keep it anyway

Offline

Board footer

Powered by FluxBB