Map caps-lock key to middle mouse clickHow do I remap certain keys or devices?Extra Mouse button assigned to...
What is a DAG (Graph Theory)?
TikZ graph edges not drawn nicely
What happens when I Twin Life Transference?
Separate environment for personal and development use under macOS
How to make ice magic work from a scientific point of view?
A Missing Symbol for This Logo
Play Zip, Zap, Zop
What is the wife of a henpecked husband called?
Existence of Riemann surface, holomorphic maps
Boss asked me to sign a resignation paper without a date on it along with my new contract
Plausible reason for gold-digging ant
Short story where statues have their heads replaced by those of carved insect heads
Why did Democrats in the Senate oppose the Born-Alive Abortion Survivors Protection Act (2019 S.130)?
What is a good reason for every spaceship to carry a weapon on board?
How do you funnel food off a cutting board?
Am I a Rude Number?
Saint abbreviation
A starship is travelling at 0.9c and collides with a small rock. Will it leave a clean hole through, or will more happen?
Strange "DuckDuckGo dork" takes me to random website
How to not let the Identify spell spoil everything?
How much mayhem could I cause as a fish?
Why did Luke use his left hand to shoot?
How to deal with possible delayed baggage?
Why didn't Tom Riddle take the presence of Fawkes and the Sorting Hat as more of a threat?
Map caps-lock key to middle mouse click
How do I remap certain keys or devices?Extra Mouse button assigned to Super-W short cutRemap Caps Lock key to 'Run Command' (Alt+F2)Can I bind the Unity dock to the Caps Lock key?After swapping Ctrl and caps in xmodmap, how can I make Ctrl work properly for multi-modifier combinations?How do I map a key to middle click?Map Double Click to Key CombinationMap Caps key to Super+Alt+Ctrl?Use Caps Lock as arbitrary shortcut key in KDE5How do I remap the caps lock key to the backspace key?How to use both mouse buttons simultaneously as middle-click?Map the Caps Lock key to the Super L key
Since I rarely use caps-lock, I'd like to map the key to a middle mouse click instead. I would also like to map Alt+Caps Lock to the original function of the caps lock key, should I ever need it.
I can map any keyboard shortcut to xdotool click 2
, but the Gnome Keyboard Shortcuts dialog won't let me assign a command to the caps-lock key, even with modifiers.
I know this is a bit of a strange undertaking; How would I go about doing it?
xorg keyboard shortcut-keys input-devices xmodmap
add a comment |
Since I rarely use caps-lock, I'd like to map the key to a middle mouse click instead. I would also like to map Alt+Caps Lock to the original function of the caps lock key, should I ever need it.
I can map any keyboard shortcut to xdotool click 2
, but the Gnome Keyboard Shortcuts dialog won't let me assign a command to the caps-lock key, even with modifiers.
I know this is a bit of a strange undertaking; How would I go about doing it?
xorg keyboard shortcut-keys input-devices xmodmap
add a comment |
Since I rarely use caps-lock, I'd like to map the key to a middle mouse click instead. I would also like to map Alt+Caps Lock to the original function of the caps lock key, should I ever need it.
I can map any keyboard shortcut to xdotool click 2
, but the Gnome Keyboard Shortcuts dialog won't let me assign a command to the caps-lock key, even with modifiers.
I know this is a bit of a strange undertaking; How would I go about doing it?
xorg keyboard shortcut-keys input-devices xmodmap
Since I rarely use caps-lock, I'd like to map the key to a middle mouse click instead. I would also like to map Alt+Caps Lock to the original function of the caps lock key, should I ever need it.
I can map any keyboard shortcut to xdotool click 2
, but the Gnome Keyboard Shortcuts dialog won't let me assign a command to the caps-lock key, even with modifiers.
I know this is a bit of a strange undertaking; How would I go about doing it?
xorg keyboard shortcut-keys input-devices xmodmap
xorg keyboard shortcut-keys input-devices xmodmap
edited Feb 26 '11 at 4:11
Erigami
3,72232042
3,72232042
asked Dec 14 '10 at 7:04
Stefano Palazzo♦Stefano Palazzo
63.4k33183216
63.4k33183216
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
If you first remove the lock modifier from the Caps Lock key you should then be able to assign the key in Keyboard Shortcuts, use the command below to do that:
echo 'remove lock = Caps_Lock' | xmodmap -
very good! any chance to get caps lock back onto alt+capslock?
– Stefano Palazzo♦
Dec 18 '10 at 16:36
add a comment |
Another easy solution if you prefer to use a GUI is to install easystroke:
sudo apt-get install easystroke
You can easily map keyboard keys and shortcuts to mouse buttons as well as mouse gestures.
add a comment |
Old question, new answer, copying myself from here:
https://superuser.com/questions/947807/emulate-left-mouse-button-with-capslock-key/1409757#1409757
I was looking for CapsLock = left click, should be similar. I believe only difference is in the line "xte 'mouseclick 1'"
change to "xte 'mouseclick 2'"
.
This requires the xbindkeys
and xautomation
packages installed on your system.
In my ~/.bashrc
(or whatever startup script is appropriate to your system) I added these lines:
/usr/bin/xmodmap -e "remove lock = Caps_Lock"
/usr/bin/xmodmap -e "keycode 66 ="
/usr/bin/xbindkeys -f ~/.xbindkeysrc
This apparently removes the 'locking' behavior of Caps Lock and assigns that key (key 66) to nothingness. Then it lets xbindkeys
assign the behavior we want.
For that I created the file ~/.xbindkeysrc with these lines:
"xte 'mouseclick 1'"
c:66
A reboot or running source ~/.bashrc
should make it work. If you are tinkering with xbindkeys
and need to reload it, try this:
killall xbindkeys
xbindkeys -f ~/.xbindkeysrc
New contributor
add a comment |
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/3.0/"u003ecc by-sa 3.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%2f17294%2fmap-caps-lock-key-to-middle-mouse-click%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you first remove the lock modifier from the Caps Lock key you should then be able to assign the key in Keyboard Shortcuts, use the command below to do that:
echo 'remove lock = Caps_Lock' | xmodmap -
very good! any chance to get caps lock back onto alt+capslock?
– Stefano Palazzo♦
Dec 18 '10 at 16:36
add a comment |
If you first remove the lock modifier from the Caps Lock key you should then be able to assign the key in Keyboard Shortcuts, use the command below to do that:
echo 'remove lock = Caps_Lock' | xmodmap -
very good! any chance to get caps lock back onto alt+capslock?
– Stefano Palazzo♦
Dec 18 '10 at 16:36
add a comment |
If you first remove the lock modifier from the Caps Lock key you should then be able to assign the key in Keyboard Shortcuts, use the command below to do that:
echo 'remove lock = Caps_Lock' | xmodmap -
If you first remove the lock modifier from the Caps Lock key you should then be able to assign the key in Keyboard Shortcuts, use the command below to do that:
echo 'remove lock = Caps_Lock' | xmodmap -
answered Dec 18 '10 at 1:05
AndyAndy
727314
727314
very good! any chance to get caps lock back onto alt+capslock?
– Stefano Palazzo♦
Dec 18 '10 at 16:36
add a comment |
very good! any chance to get caps lock back onto alt+capslock?
– Stefano Palazzo♦
Dec 18 '10 at 16:36
very good! any chance to get caps lock back onto alt+capslock?
– Stefano Palazzo♦
Dec 18 '10 at 16:36
very good! any chance to get caps lock back onto alt+capslock?
– Stefano Palazzo♦
Dec 18 '10 at 16:36
add a comment |
Another easy solution if you prefer to use a GUI is to install easystroke:
sudo apt-get install easystroke
You can easily map keyboard keys and shortcuts to mouse buttons as well as mouse gestures.
add a comment |
Another easy solution if you prefer to use a GUI is to install easystroke:
sudo apt-get install easystroke
You can easily map keyboard keys and shortcuts to mouse buttons as well as mouse gestures.
add a comment |
Another easy solution if you prefer to use a GUI is to install easystroke:
sudo apt-get install easystroke
You can easily map keyboard keys and shortcuts to mouse buttons as well as mouse gestures.
Another easy solution if you prefer to use a GUI is to install easystroke:
sudo apt-get install easystroke
You can easily map keyboard keys and shortcuts to mouse buttons as well as mouse gestures.
edited Feb 14 '17 at 9:45
Zanna
50.9k13136241
50.9k13136241
answered Jul 13 '12 at 15:07
user76179user76179
191
191
add a comment |
add a comment |
Old question, new answer, copying myself from here:
https://superuser.com/questions/947807/emulate-left-mouse-button-with-capslock-key/1409757#1409757
I was looking for CapsLock = left click, should be similar. I believe only difference is in the line "xte 'mouseclick 1'"
change to "xte 'mouseclick 2'"
.
This requires the xbindkeys
and xautomation
packages installed on your system.
In my ~/.bashrc
(or whatever startup script is appropriate to your system) I added these lines:
/usr/bin/xmodmap -e "remove lock = Caps_Lock"
/usr/bin/xmodmap -e "keycode 66 ="
/usr/bin/xbindkeys -f ~/.xbindkeysrc
This apparently removes the 'locking' behavior of Caps Lock and assigns that key (key 66) to nothingness. Then it lets xbindkeys
assign the behavior we want.
For that I created the file ~/.xbindkeysrc with these lines:
"xte 'mouseclick 1'"
c:66
A reboot or running source ~/.bashrc
should make it work. If you are tinkering with xbindkeys
and need to reload it, try this:
killall xbindkeys
xbindkeys -f ~/.xbindkeysrc
New contributor
add a comment |
Old question, new answer, copying myself from here:
https://superuser.com/questions/947807/emulate-left-mouse-button-with-capslock-key/1409757#1409757
I was looking for CapsLock = left click, should be similar. I believe only difference is in the line "xte 'mouseclick 1'"
change to "xte 'mouseclick 2'"
.
This requires the xbindkeys
and xautomation
packages installed on your system.
In my ~/.bashrc
(or whatever startup script is appropriate to your system) I added these lines:
/usr/bin/xmodmap -e "remove lock = Caps_Lock"
/usr/bin/xmodmap -e "keycode 66 ="
/usr/bin/xbindkeys -f ~/.xbindkeysrc
This apparently removes the 'locking' behavior of Caps Lock and assigns that key (key 66) to nothingness. Then it lets xbindkeys
assign the behavior we want.
For that I created the file ~/.xbindkeysrc with these lines:
"xte 'mouseclick 1'"
c:66
A reboot or running source ~/.bashrc
should make it work. If you are tinkering with xbindkeys
and need to reload it, try this:
killall xbindkeys
xbindkeys -f ~/.xbindkeysrc
New contributor
add a comment |
Old question, new answer, copying myself from here:
https://superuser.com/questions/947807/emulate-left-mouse-button-with-capslock-key/1409757#1409757
I was looking for CapsLock = left click, should be similar. I believe only difference is in the line "xte 'mouseclick 1'"
change to "xte 'mouseclick 2'"
.
This requires the xbindkeys
and xautomation
packages installed on your system.
In my ~/.bashrc
(or whatever startup script is appropriate to your system) I added these lines:
/usr/bin/xmodmap -e "remove lock = Caps_Lock"
/usr/bin/xmodmap -e "keycode 66 ="
/usr/bin/xbindkeys -f ~/.xbindkeysrc
This apparently removes the 'locking' behavior of Caps Lock and assigns that key (key 66) to nothingness. Then it lets xbindkeys
assign the behavior we want.
For that I created the file ~/.xbindkeysrc with these lines:
"xte 'mouseclick 1'"
c:66
A reboot or running source ~/.bashrc
should make it work. If you are tinkering with xbindkeys
and need to reload it, try this:
killall xbindkeys
xbindkeys -f ~/.xbindkeysrc
New contributor
Old question, new answer, copying myself from here:
https://superuser.com/questions/947807/emulate-left-mouse-button-with-capslock-key/1409757#1409757
I was looking for CapsLock = left click, should be similar. I believe only difference is in the line "xte 'mouseclick 1'"
change to "xte 'mouseclick 2'"
.
This requires the xbindkeys
and xautomation
packages installed on your system.
In my ~/.bashrc
(or whatever startup script is appropriate to your system) I added these lines:
/usr/bin/xmodmap -e "remove lock = Caps_Lock"
/usr/bin/xmodmap -e "keycode 66 ="
/usr/bin/xbindkeys -f ~/.xbindkeysrc
This apparently removes the 'locking' behavior of Caps Lock and assigns that key (key 66) to nothingness. Then it lets xbindkeys
assign the behavior we want.
For that I created the file ~/.xbindkeysrc with these lines:
"xte 'mouseclick 1'"
c:66
A reboot or running source ~/.bashrc
should make it work. If you are tinkering with xbindkeys
and need to reload it, try this:
killall xbindkeys
xbindkeys -f ~/.xbindkeysrc
New contributor
New contributor
answered 6 mins ago
Brian StamperBrian Stamper
101
101
New contributor
New contributor
add a comment |
add a comment |
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%2f17294%2fmap-caps-lock-key-to-middle-mouse-click%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