How to use Mode_switch and xmodmap in current Ubuntu versions?


up vote
1
down vote
favorite
For years I used the following ~/.Xmodmap
file to get german umlauts quickly, e.g. when I press the ALT_R + a
I get ä
. A nice shortcut compared to using the compose key:
keycode 108 = Mode_switch
keycode 38 = a A adiaeresis Adiaeresis adiaeresis Adiaeresis
keycode 30 = u U udiaeresis Udiaeresis udiaeresis Udiaeresis
keycode 32 = o O odiaeresis Odiaeresis odiaeresis Odiaeresis
keycode 39 = s S ssharp ssharp ssharp ssharp
keycode 20 = minus underscore endash endash endash endash
keycode 60 = period greater ellipsis ellipsis ellipsis ellipsis
keycode 61 = slash question emdash emdash emdash emdash
Note: I'm using the Happy Hacker Keyboard, which has no ALT_GR
key. The keycode 108
is sent by the right ALT key and Mode_switch
generally corresponds to the 2nd and 3rd values above.
Since 17.10 all combinations only result in a warning sound, nothing else happens. I noticed the same on Fedora 27, so maybe it's related to new xkb settings and / or Gnome Shell?
Any ideas how I can archiev this under current Gnome Shell setups?
17.10 keyboard-layout gnome-shell xmodmap xkb
add a comment |Â
up vote
1
down vote
favorite
For years I used the following ~/.Xmodmap
file to get german umlauts quickly, e.g. when I press the ALT_R + a
I get ä
. A nice shortcut compared to using the compose key:
keycode 108 = Mode_switch
keycode 38 = a A adiaeresis Adiaeresis adiaeresis Adiaeresis
keycode 30 = u U udiaeresis Udiaeresis udiaeresis Udiaeresis
keycode 32 = o O odiaeresis Odiaeresis odiaeresis Odiaeresis
keycode 39 = s S ssharp ssharp ssharp ssharp
keycode 20 = minus underscore endash endash endash endash
keycode 60 = period greater ellipsis ellipsis ellipsis ellipsis
keycode 61 = slash question emdash emdash emdash emdash
Note: I'm using the Happy Hacker Keyboard, which has no ALT_GR
key. The keycode 108
is sent by the right ALT key and Mode_switch
generally corresponds to the 2nd and 3rd values above.
Since 17.10 all combinations only result in a warning sound, nothing else happens. I noticed the same on Fedora 27, so maybe it's related to new xkb settings and / or Gnome Shell?
Any ideas how I can archiev this under current Gnome Shell setups?
17.10 keyboard-layout gnome-shell xmodmap xkb
1
Assuming you use the English (US) layout, you can create a keyboard layout variant by editing the us symbols file. This answer, which was written in response to a similar question, may provide the guidance you need.
â Gunnar Hjalmarsson
Feb 16 at 21:26
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
For years I used the following ~/.Xmodmap
file to get german umlauts quickly, e.g. when I press the ALT_R + a
I get ä
. A nice shortcut compared to using the compose key:
keycode 108 = Mode_switch
keycode 38 = a A adiaeresis Adiaeresis adiaeresis Adiaeresis
keycode 30 = u U udiaeresis Udiaeresis udiaeresis Udiaeresis
keycode 32 = o O odiaeresis Odiaeresis odiaeresis Odiaeresis
keycode 39 = s S ssharp ssharp ssharp ssharp
keycode 20 = minus underscore endash endash endash endash
keycode 60 = period greater ellipsis ellipsis ellipsis ellipsis
keycode 61 = slash question emdash emdash emdash emdash
Note: I'm using the Happy Hacker Keyboard, which has no ALT_GR
key. The keycode 108
is sent by the right ALT key and Mode_switch
generally corresponds to the 2nd and 3rd values above.
Since 17.10 all combinations only result in a warning sound, nothing else happens. I noticed the same on Fedora 27, so maybe it's related to new xkb settings and / or Gnome Shell?
Any ideas how I can archiev this under current Gnome Shell setups?
17.10 keyboard-layout gnome-shell xmodmap xkb
For years I used the following ~/.Xmodmap
file to get german umlauts quickly, e.g. when I press the ALT_R + a
I get ä
. A nice shortcut compared to using the compose key:
keycode 108 = Mode_switch
keycode 38 = a A adiaeresis Adiaeresis adiaeresis Adiaeresis
keycode 30 = u U udiaeresis Udiaeresis udiaeresis Udiaeresis
keycode 32 = o O odiaeresis Odiaeresis odiaeresis Odiaeresis
keycode 39 = s S ssharp ssharp ssharp ssharp
keycode 20 = minus underscore endash endash endash endash
keycode 60 = period greater ellipsis ellipsis ellipsis ellipsis
keycode 61 = slash question emdash emdash emdash emdash
Note: I'm using the Happy Hacker Keyboard, which has no ALT_GR
key. The keycode 108
is sent by the right ALT key and Mode_switch
generally corresponds to the 2nd and 3rd values above.
Since 17.10 all combinations only result in a warning sound, nothing else happens. I noticed the same on Fedora 27, so maybe it's related to new xkb settings and / or Gnome Shell?
Any ideas how I can archiev this under current Gnome Shell setups?
17.10 keyboard-layout gnome-shell xmodmap xkb
17.10 keyboard-layout gnome-shell xmodmap xkb
asked Feb 16 at 17:22
Brutus
348417
348417
1
Assuming you use the English (US) layout, you can create a keyboard layout variant by editing the us symbols file. This answer, which was written in response to a similar question, may provide the guidance you need.
â Gunnar Hjalmarsson
Feb 16 at 21:26
add a comment |Â
1
Assuming you use the English (US) layout, you can create a keyboard layout variant by editing the us symbols file. This answer, which was written in response to a similar question, may provide the guidance you need.
â Gunnar Hjalmarsson
Feb 16 at 21:26
1
1
Assuming you use the English (US) layout, you can create a keyboard layout variant by editing the us symbols file. This answer, which was written in response to a similar question, may provide the guidance you need.
â Gunnar Hjalmarsson
Feb 16 at 21:26
Assuming you use the English (US) layout, you can create a keyboard layout variant by editing the us symbols file. This answer, which was written in response to a similar question, may provide the guidance you need.
â Gunnar Hjalmarsson
Feb 16 at 21:26
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
Thanks to Gunnar Hjalmarsson, I found enough information in this answer. Here's what I did:
To include some new key settings, I added this to the end of /usr/share/X11/xkb/symbols/us
:
partial alphanumeric_keys
xkb_symbols "us-de"
// include all the definitions from us(basic), I just want to add to it
include "us(basic)"
name[Group1]= "English (US, with german umlauts)";
// add german umlauts
key <AC01> [ a, A, adiaeresis, Adiaeresis ] ;
key <AD07> [ u, U, udiaeresis, Udiaeresis ] ;
key <AD09> [ o, O, odiaeresis, Odiaeresis ] ;
key <AC02> [ s, S, ssharp, ssharp ] ;
// and some other keys
key <AE11> [ minus, underscore, endash, endash ] ;
key <AB09> [ period, greater, ellipsis, ellipsis ] ;
key <AB10> [ slash, question, emdash, emdash ] ;
// have ALT_R as level 3 switch
include "level3(ralt_switch)"
;
And to have a variant I can select from Settings > Region & Language, I added
the following to the end of the variantList for English (US)
in this XML
file /usr/share/X11/xkb/rules/evdev.xml
:
<variant>
<configItem>
<name>us-de</name>
<description>English (US, with german umlauts)</description>
</configItem>
</variant>
After a sudo systemctl restart keyboard-setup.service
I could select the new
layout variant from Settings > Region & Language.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Thanks to Gunnar Hjalmarsson, I found enough information in this answer. Here's what I did:
To include some new key settings, I added this to the end of /usr/share/X11/xkb/symbols/us
:
partial alphanumeric_keys
xkb_symbols "us-de"
// include all the definitions from us(basic), I just want to add to it
include "us(basic)"
name[Group1]= "English (US, with german umlauts)";
// add german umlauts
key <AC01> [ a, A, adiaeresis, Adiaeresis ] ;
key <AD07> [ u, U, udiaeresis, Udiaeresis ] ;
key <AD09> [ o, O, odiaeresis, Odiaeresis ] ;
key <AC02> [ s, S, ssharp, ssharp ] ;
// and some other keys
key <AE11> [ minus, underscore, endash, endash ] ;
key <AB09> [ period, greater, ellipsis, ellipsis ] ;
key <AB10> [ slash, question, emdash, emdash ] ;
// have ALT_R as level 3 switch
include "level3(ralt_switch)"
;
And to have a variant I can select from Settings > Region & Language, I added
the following to the end of the variantList for English (US)
in this XML
file /usr/share/X11/xkb/rules/evdev.xml
:
<variant>
<configItem>
<name>us-de</name>
<description>English (US, with german umlauts)</description>
</configItem>
</variant>
After a sudo systemctl restart keyboard-setup.service
I could select the new
layout variant from Settings > Region & Language.
add a comment |Â
up vote
2
down vote
Thanks to Gunnar Hjalmarsson, I found enough information in this answer. Here's what I did:
To include some new key settings, I added this to the end of /usr/share/X11/xkb/symbols/us
:
partial alphanumeric_keys
xkb_symbols "us-de"
// include all the definitions from us(basic), I just want to add to it
include "us(basic)"
name[Group1]= "English (US, with german umlauts)";
// add german umlauts
key <AC01> [ a, A, adiaeresis, Adiaeresis ] ;
key <AD07> [ u, U, udiaeresis, Udiaeresis ] ;
key <AD09> [ o, O, odiaeresis, Odiaeresis ] ;
key <AC02> [ s, S, ssharp, ssharp ] ;
// and some other keys
key <AE11> [ minus, underscore, endash, endash ] ;
key <AB09> [ period, greater, ellipsis, ellipsis ] ;
key <AB10> [ slash, question, emdash, emdash ] ;
// have ALT_R as level 3 switch
include "level3(ralt_switch)"
;
And to have a variant I can select from Settings > Region & Language, I added
the following to the end of the variantList for English (US)
in this XML
file /usr/share/X11/xkb/rules/evdev.xml
:
<variant>
<configItem>
<name>us-de</name>
<description>English (US, with german umlauts)</description>
</configItem>
</variant>
After a sudo systemctl restart keyboard-setup.service
I could select the new
layout variant from Settings > Region & Language.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Thanks to Gunnar Hjalmarsson, I found enough information in this answer. Here's what I did:
To include some new key settings, I added this to the end of /usr/share/X11/xkb/symbols/us
:
partial alphanumeric_keys
xkb_symbols "us-de"
// include all the definitions from us(basic), I just want to add to it
include "us(basic)"
name[Group1]= "English (US, with german umlauts)";
// add german umlauts
key <AC01> [ a, A, adiaeresis, Adiaeresis ] ;
key <AD07> [ u, U, udiaeresis, Udiaeresis ] ;
key <AD09> [ o, O, odiaeresis, Odiaeresis ] ;
key <AC02> [ s, S, ssharp, ssharp ] ;
// and some other keys
key <AE11> [ minus, underscore, endash, endash ] ;
key <AB09> [ period, greater, ellipsis, ellipsis ] ;
key <AB10> [ slash, question, emdash, emdash ] ;
// have ALT_R as level 3 switch
include "level3(ralt_switch)"
;
And to have a variant I can select from Settings > Region & Language, I added
the following to the end of the variantList for English (US)
in this XML
file /usr/share/X11/xkb/rules/evdev.xml
:
<variant>
<configItem>
<name>us-de</name>
<description>English (US, with german umlauts)</description>
</configItem>
</variant>
After a sudo systemctl restart keyboard-setup.service
I could select the new
layout variant from Settings > Region & Language.
Thanks to Gunnar Hjalmarsson, I found enough information in this answer. Here's what I did:
To include some new key settings, I added this to the end of /usr/share/X11/xkb/symbols/us
:
partial alphanumeric_keys
xkb_symbols "us-de"
// include all the definitions from us(basic), I just want to add to it
include "us(basic)"
name[Group1]= "English (US, with german umlauts)";
// add german umlauts
key <AC01> [ a, A, adiaeresis, Adiaeresis ] ;
key <AD07> [ u, U, udiaeresis, Udiaeresis ] ;
key <AD09> [ o, O, odiaeresis, Odiaeresis ] ;
key <AC02> [ s, S, ssharp, ssharp ] ;
// and some other keys
key <AE11> [ minus, underscore, endash, endash ] ;
key <AB09> [ period, greater, ellipsis, ellipsis ] ;
key <AB10> [ slash, question, emdash, emdash ] ;
// have ALT_R as level 3 switch
include "level3(ralt_switch)"
;
And to have a variant I can select from Settings > Region & Language, I added
the following to the end of the variantList for English (US)
in this XML
file /usr/share/X11/xkb/rules/evdev.xml
:
<variant>
<configItem>
<name>us-de</name>
<description>English (US, with german umlauts)</description>
</configItem>
</variant>
After a sudo systemctl restart keyboard-setup.service
I could select the new
layout variant from Settings > Region & Language.
answered Feb 18 at 18:17
Brutus
348417
348417
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1006856%2fhow-to-use-mode-switch-and-xmodmap-in-current-ubuntu-versions%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Assuming you use the English (US) layout, you can create a keyboard layout variant by editing the us symbols file. This answer, which was written in response to a similar question, may provide the guidance you need.
â Gunnar Hjalmarsson
Feb 16 at 21:26