LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 10-20-2015, 03:09 PM   #1
thanquol1313
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.

Code:
$ 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)

Code:
$ 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
Code:
...
  os              ge: Ossetian (Georgia)
  win	          de: German (win)
  deadacute       de: German (dead acute)
...
New entries in evdev.xml and xorg.xml
Code:
...      
<layout>
      <configItem>
        <name>de</name>
        
        <shortDescription>de</shortDescription>
        <description>German</description>
        <languageList>
          <iso639Id>ger</iso639Id>
        </languageList>
      </configItem>
      <variantList>
        <variant>
          <configItem>
            <name>win</name>
            <description>German (win)</description>
          </configItem>
        </variant>
        <variant>
          <configItem>
            <name>deadacute</name>
            <description>German (dead acute)</description>
          </configItem>
        </variant>
...
What am I missing? Please help.
 
Old 10-22-2015, 06:54 AM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

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.
 
  


Reply



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 10:57 AM
Mapping AltGr key to act as WIN key krisrao Linux - Newbie 3 02-11-2009 08:14 PM
How: altgr to behave like alt JussiKp Linux - General 0 12-02-2006 11:50 AM
How to make Control_L + Alt_L act like Alt_R (Alt Gr)? THROBiX Linux - General 3 07-26-2006 08:53 AM
Own shortcut like Strg-Alt-Del commster Linux - General 4 11-11-2005 06:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:32 PM.

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