6

When I am in a console (not terminal emulator) (after using Ctrl+Alt+F_, AltGr+key combinations are not working.

I am using a Czech keyboard layout which (as many layouts do) maps various special characters to AltGr+key combinations (sometimes called dead keys, I believe). For example I can write | by typing AltGr+w (AltGr is right-Alt).

This works perfectly in DE (in my case GNOME Shell), but doesn't in a Linux console. Any advice how to fix it? The Czech layout is missing many important keys (like >) so it's kinda impossible to work in terminal. I use Fedora 25 with latest updates.

EDIT: I've just tried it on my second PC with Fedora 25 (but upgraded from F24 and still using X11 instead of Wayland) and it works correctly..

Output of dumpkeys | grep -e 'AltGr\|Alt':

keycode  56 = Alt              Alt              Alt              Alt              Alt              Alt              Alt              Alt              Alt              Alt              Alt              Alt              Alt              Alt              Alt              Alt             
keycode 100 = AltGr            AltGr            AltGr            AltGr            AltGr            AltGr            AltGr            AltGr            AltGr            AltGr            AltGr            AltGr            AltGr            AltGr            AltGr            AltGr           
keycode 119 = AltGr_Lock       AltGr_Lock       AltGr_Lock       AltGr_Lock       AltGr_Lock       AltGr_Lock       AltGr_Lock       AltGr_Lock       AltGr_Lock       AltGr_Lock       AltGr_Lock       AltGr_Lock       AltGr_Lock       AltGr_Lock       AltGr_Lock       AltGr_Lock    

Output of dumpkeys | grep -ie 'AltGr' | sed -n '1,5p; 50,55p':

altgr   alt keycode   2 = Meta_one        
shift   altgr   alt keycode   2 = Meta_exclam     
altgr   control keycode   4 = Escape          
altgr   alt keycode   4 = Meta_three      
shift   altgr   alt keycode   4 = Meta_three      
shift   altgr   alt keycode  52 = Meta_greater    
altgr   control keycode  53 = Delete          
altgr   alt keycode  53 = Meta_slash      
shift   altgr   alt keycode  53 = Meta_question   
altgr   control keycode  59 = F1              
altgr   alt keycode  59 = Console_1     

Output of localectl status:

 System Locale: LANG=en_US.UTF-8
              LC_NUMERIC=cs_CZ.UTF-8
              LC_TIME=cs_CZ.UTF-8
              LC_MONETARY=cs_CZ.UTF-8
              LC_PAPER=cs_CZ.UTF-8
              LC_MEASUREMENT=cs_CZ.UTF-8
   VC Keymap: cz-us-qwertz
  X11 Layout: cz,us
 X11 Variant: ,
7
  • 1
    Dead keys are a different thing: that's when you type one key (typically an accent) and it does nothing visible, then you type another key (typically a letter) and it inserts a character, e.g. dead_ˇ then c to enter č. Jun 9, 2017 at 23:12
  • 1
    Can you run this commands and add outputs to your question? dumpkeys | grep -e 'AltGr\|Alt' and dumpkeys | grep -ie 'AltGr' | sed -n '1,5p; 50,55p'
    – MiniMax
    Jun 10, 2017 at 12:19
  • Link to the Czech keyboard layout. I wanted to add hyperlink in the question by editing, but couldn't commit this - have got error "edit must be 10 symbols at least".
    – MiniMax
    Jun 10, 2017 at 12:28
  • 3
    A note on dumpkeys - at least on my system it requires sudo, otherwise you get a cryptic error message Couldn't get a file descriptor referring to the console
    – Joe P
    Jun 10, 2017 at 12:59
  • 2
    You have systemd (and probably wayland), so might need to use something like localectl --no-convert set-keymap .... See man localectl and localectl status.
    – meuh
    Jun 10, 2017 at 18:14

3 Answers 3

4

I had what looks like the same problem, after I switched to the Gnome desktop. But setting any of the de keymaps like in the first answer was no help. Apparently Gnome maps AltGr to Alt, and this can be changed with

gsettings set org.gnome.desktop.input-sources xkb-options "['mode_switch:ralt_rctrl']"
1
  • Worked for me, and I then noticed that the solution just disables the Compose key (you can do the same from settings UI), which could be just good enough.Thanks!
    – ymajoros
    Jul 24 at 15:42
1

Solution for my problem is to run localectl --no-convert set-keymap cz.

This will change VC Keymap from cz-us-qwertz which doesn't seem to define AltGr combinations as they are shown here.

0

I was using Polish layout (it doesn't really matter) in KDE5 and had the same issue; with left or right alt (altrg) used as modificator to choose 3rd level, the behaviour was incosistent:

$ plasmashell --version
plasmashell 5.27.6
$ kf5-config --version
Qt: 5.15.10
KDE Frameworks: 5.108.0
kf5-config: 1.0

I had to unselect "Meta is mapped to Win" option under Advanced Keyboard settings in System Settings under "Alt and Win behaviour". This helped in my particular case.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .