Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-20-2015, 04:09 PM   #1
LQ Newbie
Registered: Sep 2015
Distribution: fedora
Posts: 10

Rep: Reputation: Disabled
Fedora 22 gnome Strg + Alt act like AltGr

I'm using the German keyboard layout but I'm used to the Windows behaviour that Strg + Alt acts like the AltGr key. I need it for programming to reach leftbracket etc. easily. I've tried already some stuff and read through man pages and online tuts but nothing works the way I want so far. My most recent attempt was editing the xkb files to add a new variant based on the original german layout.

$ sudo gedit /usr/share/X11/xkb/symbols/de
partial alphanumeric_keys modifier_keys
xkb_symbols "win" {
    // previous standard German layout but CTRL + ALT is level3
    include "de(basic)"
    name[Group1]="German (win)";
    key <AE07>  {type[Group2]="CTRL_ALT", symbols[Group1]=[7, slash], symbols[Group2]=[braceleft, seveneight]};
    include "kpdl(dot)"
For testing purposes I added only <AE07> but in the end it shall work with <AE08> ... too
The selection of the variant works so far that on the NUMPAD , is now a . (so include "kpdl(dot)" works)

$ sudo gedit /usr/share/X11/xkb/types/level3

partial default xkb_types "default" {

    // A key type which can be used to implement
    // a windows behaviour to reach level3

    virtual_modifiers Alt;

    type "CTRL_ALT" {
	modifiers = Shift+Ctrl;
	map[None] = Level1;
	map[Shift] = Level2;
	map[Alt+Ctrl] = Level3;
	map[Shift+Alt+Ctrl] = Level4;
	level_name[Level1] = "Base";
	level_name[Level2] = "Shift";
	level_name[Level3] = "Level3";
	level_name[Level4] = "Level4";
New entries in evdev.lst and xorg.lst to make the variant available in Settings > Keyboard > Input Sources
  os              ge: Ossetian (Georgia)
  win	          de: German (win)
  deadacute       de: German (dead acute)
New entries in evdev.xml and xorg.xml
            <description>German (win)</description>
            <description>German (dead acute)</description>
What am I missing? Please help.
Old 10-22-2015, 07:54 AM   #2
LQ Guru
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,147

Rep: Reputation: Disabled
I was in the same boat when I wanted to add support for my native language to the US keyboard.
After messing with system files I figured it is best done in the user level. System files may be overwritten by an upgrade, too.
I created ~/.xmodmaprc file with my modifications. Depending on your distro this file may be called ~/.Xmodmap.
Of course, you can open a terminal and execute xmodmap ~/.xmodmaprc any time and your changes take effect immediately.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Remapping left alt to AltGr ChaotiCc` Linux - General 2 08-02-2012 11:57 AM
Mapping AltGr key to act as WIN key krisrao Linux - Newbie 3 02-11-2009 09:14 PM
How: altgr to behave like alt JussiKp Linux - General 0 12-02-2006 12:50 PM
How to make Control_L + Alt_L act like Alt_R (Alt Gr)? THROBiX Linux - General 3 07-26-2006 09:53 AM
Own shortcut like Strg-Alt-Del commster Linux - General 4 11-11-2005 07:37 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration