4

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: ,
  • 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 č. – Gilles Jun 9 '17 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 '17 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 '17 at 12:28
  • 2
    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 '17 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 '17 at 18:14
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.