Running xmodmap when new keyboard is plugged inHow can I change the function of the caps lock key within the Colemak keyboard layout?keybinding issues with xmodmap across synergyRemapping Caps Lock to Control and Escape (not the usual way)After swapping Ctrl and caps in xmodmap, how can I make Ctrl work properly for multi-modifier combinations?Map CapsLock key to ReturnXmodmap remapping modifiers not working?How do I remap the caps lock key to the backspace key?Xmodmap keymap on Bluetooth keyboard
Problem with a commutative diagram
Foiled Bank Robbery
Why would shrinking TEMPDB log lead to slowness?
Do European politicians typically put their pronouns on their social media pages?
How does Berkeley justify existence of other minds?
What would you do? Different results than what is reported
How can I increase the rate of regeneration in humans without the possibility of tumors developing?
How are astronauts in the ISS protected from electric shock?
Is it safe to plug one travel adapter into another?
Copying files: Does Windows write to disk if files are identical
How to handle a player wanting to use the (UA) Remote Access spell on an android player character?
Why do the Romance languages use definite articles, when Latin doesn't?
Natural Metre Bar
Why is Microwaved mac & cheese burnt where they touch?
Are homeless people protected by antidiscrimination laws?
Why are Buddhist concepts so difficult?
Why is Robin Hood French in Shrek?
Why are one-word titles so dominant in books, film, and games?
What does "crank old Sabbath" refer to?
Mutate my DNA sequence
Are these 2 resistors in parallel?
How to select pairs in a list of pairs where the second pair element is within a specified range?
What does "Summoned creature has maximum hit points" actually mean?
How do journals gain and lose reputation?
Running xmodmap when new keyboard is plugged in
How can I change the function of the caps lock key within the Colemak keyboard layout?keybinding issues with xmodmap across synergyRemapping Caps Lock to Control and Escape (not the usual way)After swapping Ctrl and caps in xmodmap, how can I make Ctrl work properly for multi-modifier combinations?Map CapsLock key to ReturnXmodmap remapping modifiers not working?How do I remap the caps lock key to the backspace key?Xmodmap keymap on Bluetooth keyboard
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
When I plug an external keyboard into my laptop (which runs Xubuntu 18.04), I have to run xmodmap ~/.Xmodmap
to apply the changes to the second keyboard also. This bothers me.
Here is my .Xmodmap
:
! change CapsLock to Escape
clear Lock
keycode 0x42 = Escape
This is supposed to make Caps Lock work like Escape, and works well for the attached keyboard. But when I plug in my USB keyboard in the live system, its Caps Lock does not act like Escape, but still like Caps Lock. I have to run xmodmap ~/.Xmodmap
again, to also change the Caps Lock key of the USB keyboard.
If the USB keyboard is plugged in at boot time, there is no problem.
Is there a way to do this automatically, when a keyboard is plugged in?
18.04 keyboard xmodmap hotplug
add a comment
|
When I plug an external keyboard into my laptop (which runs Xubuntu 18.04), I have to run xmodmap ~/.Xmodmap
to apply the changes to the second keyboard also. This bothers me.
Here is my .Xmodmap
:
! change CapsLock to Escape
clear Lock
keycode 0x42 = Escape
This is supposed to make Caps Lock work like Escape, and works well for the attached keyboard. But when I plug in my USB keyboard in the live system, its Caps Lock does not act like Escape, but still like Caps Lock. I have to run xmodmap ~/.Xmodmap
again, to also change the Caps Lock key of the USB keyboard.
If the USB keyboard is plugged in at boot time, there is no problem.
Is there a way to do this automatically, when a keyboard is plugged in?
18.04 keyboard xmodmap hotplug
It might be possible withudev
.
– Arkadiusz Drabczyk
May 29 at 15:35
@red_trumpet so when you connect your externel keyboard..the physical kyes and its functions are same? Even though you have swapped Caps Lock and Esc?? do you want solution for this swapping case or really need to run a command when external keyboard is plugged in? What is your Ubuntu Version?
– PRATAP
May 29 at 16:16
@PRATAP I added more information to the question.
– red_trumpet
May 30 at 18:53
in that case temporarily remove .Xmodmap file reboot and run this commandgsettings set org.gnome.desktop.input-sources xkb-options "['caps:escape']"
and then attach your external keyboard
– PRATAP
May 30 at 19:01
add a comment
|
When I plug an external keyboard into my laptop (which runs Xubuntu 18.04), I have to run xmodmap ~/.Xmodmap
to apply the changes to the second keyboard also. This bothers me.
Here is my .Xmodmap
:
! change CapsLock to Escape
clear Lock
keycode 0x42 = Escape
This is supposed to make Caps Lock work like Escape, and works well for the attached keyboard. But when I plug in my USB keyboard in the live system, its Caps Lock does not act like Escape, but still like Caps Lock. I have to run xmodmap ~/.Xmodmap
again, to also change the Caps Lock key of the USB keyboard.
If the USB keyboard is plugged in at boot time, there is no problem.
Is there a way to do this automatically, when a keyboard is plugged in?
18.04 keyboard xmodmap hotplug
When I plug an external keyboard into my laptop (which runs Xubuntu 18.04), I have to run xmodmap ~/.Xmodmap
to apply the changes to the second keyboard also. This bothers me.
Here is my .Xmodmap
:
! change CapsLock to Escape
clear Lock
keycode 0x42 = Escape
This is supposed to make Caps Lock work like Escape, and works well for the attached keyboard. But when I plug in my USB keyboard in the live system, its Caps Lock does not act like Escape, but still like Caps Lock. I have to run xmodmap ~/.Xmodmap
again, to also change the Caps Lock key of the USB keyboard.
If the USB keyboard is plugged in at boot time, there is no problem.
Is there a way to do this automatically, when a keyboard is plugged in?
18.04 keyboard xmodmap hotplug
18.04 keyboard xmodmap hotplug
edited May 30 at 18:51
red_trumpet
asked May 29 at 14:54
red_trumpetred_trumpet
7261 gold badge9 silver badges28 bronze badges
7261 gold badge9 silver badges28 bronze badges
It might be possible withudev
.
– Arkadiusz Drabczyk
May 29 at 15:35
@red_trumpet so when you connect your externel keyboard..the physical kyes and its functions are same? Even though you have swapped Caps Lock and Esc?? do you want solution for this swapping case or really need to run a command when external keyboard is plugged in? What is your Ubuntu Version?
– PRATAP
May 29 at 16:16
@PRATAP I added more information to the question.
– red_trumpet
May 30 at 18:53
in that case temporarily remove .Xmodmap file reboot and run this commandgsettings set org.gnome.desktop.input-sources xkb-options "['caps:escape']"
and then attach your external keyboard
– PRATAP
May 30 at 19:01
add a comment
|
It might be possible withudev
.
– Arkadiusz Drabczyk
May 29 at 15:35
@red_trumpet so when you connect your externel keyboard..the physical kyes and its functions are same? Even though you have swapped Caps Lock and Esc?? do you want solution for this swapping case or really need to run a command when external keyboard is plugged in? What is your Ubuntu Version?
– PRATAP
May 29 at 16:16
@PRATAP I added more information to the question.
– red_trumpet
May 30 at 18:53
in that case temporarily remove .Xmodmap file reboot and run this commandgsettings set org.gnome.desktop.input-sources xkb-options "['caps:escape']"
and then attach your external keyboard
– PRATAP
May 30 at 19:01
It might be possible with
udev
.– Arkadiusz Drabczyk
May 29 at 15:35
It might be possible with
udev
.– Arkadiusz Drabczyk
May 29 at 15:35
@red_trumpet so when you connect your externel keyboard..the physical kyes and its functions are same? Even though you have swapped Caps Lock and Esc?? do you want solution for this swapping case or really need to run a command when external keyboard is plugged in? What is your Ubuntu Version?
– PRATAP
May 29 at 16:16
@red_trumpet so when you connect your externel keyboard..the physical kyes and its functions are same? Even though you have swapped Caps Lock and Esc?? do you want solution for this swapping case or really need to run a command when external keyboard is plugged in? What is your Ubuntu Version?
– PRATAP
May 29 at 16:16
@PRATAP I added more information to the question.
– red_trumpet
May 30 at 18:53
@PRATAP I added more information to the question.
– red_trumpet
May 30 at 18:53
in that case temporarily remove .Xmodmap file reboot and run this command
gsettings set org.gnome.desktop.input-sources xkb-options "['caps:escape']"
and then attach your external keyboard– PRATAP
May 30 at 19:01
in that case temporarily remove .Xmodmap file reboot and run this command
gsettings set org.gnome.desktop.input-sources xkb-options "['caps:escape']"
and then attach your external keyboard– PRATAP
May 30 at 19:01
add a comment
|
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1147151%2frunning-xmodmap-when-new-keyboard-is-plugged-in%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1147151%2frunning-xmodmap-when-new-keyboard-is-plugged-in%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
It might be possible with
udev
.– Arkadiusz Drabczyk
May 29 at 15:35
@red_trumpet so when you connect your externel keyboard..the physical kyes and its functions are same? Even though you have swapped Caps Lock and Esc?? do you want solution for this swapping case or really need to run a command when external keyboard is plugged in? What is your Ubuntu Version?
– PRATAP
May 29 at 16:16
@PRATAP I added more information to the question.
– red_trumpet
May 30 at 18:53
in that case temporarily remove .Xmodmap file reboot and run this command
gsettings set org.gnome.desktop.input-sources xkb-options "['caps:escape']"
and then attach your external keyboard– PRATAP
May 30 at 19:01