How to map mouse keys as keyboard keys without losing'numeric keypad' for Linux?












2















I know how to map mouse click for F1, F2 and F3 (respectively left click, middle click, right click):



xkbset m   # required, but disable keypad
xmodmap -e "keycode 67 = Pointer_Button1 Pointer_Button1"
xmodmap -e "keycode 68 = Pointer_Button2"
xmodmap -e "keycode 69 = Pointer_Button3"


But this requires me to use xkbset m that use the slow keys mode :



If I press 4 from the keypad, it moves the cursor to the left. I don't need this feature, just the mapping above.



I tried to figure it out with xdotool, but I don't know how to handle key pressed/key released (for drag & drop) with



xdotool mousedown 1
xdotool mouseup 1


How can I not use this mode or how can I remap all keypad keys ?



What about the numeric and arithmetic signs from keypad please ?



Is there another solution ?



For information, needed for Debian (cinnamon) and Archlinux (xfce), and if possible, I would like a solution not based on the window manager.



EDIT:



Tried this solution but I can't drag and drop with F1.



In ~/.xbindkeys :



"xdotool mousedown 1"
F1
"xdotool mouseup 1"
F1 + Release


Or :



"xdotool mousedown 1"
m:0x10 + c:67
"xdotool mouseup 1"
m:0x10 + c:67 + Release


Then :



xset -r 67









share|improve this question

























  • Does xdotool do what you need?

    – joat
    14 hours ago











  • The problem with xdotool is the key pressed, like drag and drop with left click. If you found a solution that is working with xdotool and drag&drop, I will accept it

    – Mévatlavé Kraspek
    13 hours ago











  • Added solution that is not working for me with xdotool and xbindkeys

    – Mévatlavé Kraspek
    8 hours ago


















2















I know how to map mouse click for F1, F2 and F3 (respectively left click, middle click, right click):



xkbset m   # required, but disable keypad
xmodmap -e "keycode 67 = Pointer_Button1 Pointer_Button1"
xmodmap -e "keycode 68 = Pointer_Button2"
xmodmap -e "keycode 69 = Pointer_Button3"


But this requires me to use xkbset m that use the slow keys mode :



If I press 4 from the keypad, it moves the cursor to the left. I don't need this feature, just the mapping above.



I tried to figure it out with xdotool, but I don't know how to handle key pressed/key released (for drag & drop) with



xdotool mousedown 1
xdotool mouseup 1


How can I not use this mode or how can I remap all keypad keys ?



What about the numeric and arithmetic signs from keypad please ?



Is there another solution ?



For information, needed for Debian (cinnamon) and Archlinux (xfce), and if possible, I would like a solution not based on the window manager.



EDIT:



Tried this solution but I can't drag and drop with F1.



In ~/.xbindkeys :



"xdotool mousedown 1"
F1
"xdotool mouseup 1"
F1 + Release


Or :



"xdotool mousedown 1"
m:0x10 + c:67
"xdotool mouseup 1"
m:0x10 + c:67 + Release


Then :



xset -r 67









share|improve this question

























  • Does xdotool do what you need?

    – joat
    14 hours ago











  • The problem with xdotool is the key pressed, like drag and drop with left click. If you found a solution that is working with xdotool and drag&drop, I will accept it

    – Mévatlavé Kraspek
    13 hours ago











  • Added solution that is not working for me with xdotool and xbindkeys

    – Mévatlavé Kraspek
    8 hours ago
















2












2








2








I know how to map mouse click for F1, F2 and F3 (respectively left click, middle click, right click):



xkbset m   # required, but disable keypad
xmodmap -e "keycode 67 = Pointer_Button1 Pointer_Button1"
xmodmap -e "keycode 68 = Pointer_Button2"
xmodmap -e "keycode 69 = Pointer_Button3"


But this requires me to use xkbset m that use the slow keys mode :



If I press 4 from the keypad, it moves the cursor to the left. I don't need this feature, just the mapping above.



I tried to figure it out with xdotool, but I don't know how to handle key pressed/key released (for drag & drop) with



xdotool mousedown 1
xdotool mouseup 1


How can I not use this mode or how can I remap all keypad keys ?



What about the numeric and arithmetic signs from keypad please ?



Is there another solution ?



For information, needed for Debian (cinnamon) and Archlinux (xfce), and if possible, I would like a solution not based on the window manager.



EDIT:



Tried this solution but I can't drag and drop with F1.



In ~/.xbindkeys :



"xdotool mousedown 1"
F1
"xdotool mouseup 1"
F1 + Release


Or :



"xdotool mousedown 1"
m:0x10 + c:67
"xdotool mouseup 1"
m:0x10 + c:67 + Release


Then :



xset -r 67









share|improve this question
















I know how to map mouse click for F1, F2 and F3 (respectively left click, middle click, right click):



xkbset m   # required, but disable keypad
xmodmap -e "keycode 67 = Pointer_Button1 Pointer_Button1"
xmodmap -e "keycode 68 = Pointer_Button2"
xmodmap -e "keycode 69 = Pointer_Button3"


But this requires me to use xkbset m that use the slow keys mode :



If I press 4 from the keypad, it moves the cursor to the left. I don't need this feature, just the mapping above.



I tried to figure it out with xdotool, but I don't know how to handle key pressed/key released (for drag & drop) with



xdotool mousedown 1
xdotool mouseup 1


How can I not use this mode or how can I remap all keypad keys ?



What about the numeric and arithmetic signs from keypad please ?



Is there another solution ?



For information, needed for Debian (cinnamon) and Archlinux (xfce), and if possible, I would like a solution not based on the window manager.



EDIT:



Tried this solution but I can't drag and drop with F1.



In ~/.xbindkeys :



"xdotool mousedown 1"
F1
"xdotool mouseup 1"
F1 + Release


Or :



"xdotool mousedown 1"
m:0x10 + c:67
"xdotool mouseup 1"
m:0x10 + c:67 + Release


Then :



xset -r 67






linux xorg keyboard mouse xmodmap






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 21 mins ago









Jeff Schaller

40.6k1054129




40.6k1054129










asked 14 hours ago









Mévatlavé KraspekMévatlavé Kraspek

1665




1665













  • Does xdotool do what you need?

    – joat
    14 hours ago











  • The problem with xdotool is the key pressed, like drag and drop with left click. If you found a solution that is working with xdotool and drag&drop, I will accept it

    – Mévatlavé Kraspek
    13 hours ago











  • Added solution that is not working for me with xdotool and xbindkeys

    – Mévatlavé Kraspek
    8 hours ago





















  • Does xdotool do what you need?

    – joat
    14 hours ago











  • The problem with xdotool is the key pressed, like drag and drop with left click. If you found a solution that is working with xdotool and drag&drop, I will accept it

    – Mévatlavé Kraspek
    13 hours ago











  • Added solution that is not working for me with xdotool and xbindkeys

    – Mévatlavé Kraspek
    8 hours ago



















Does xdotool do what you need?

– joat
14 hours ago





Does xdotool do what you need?

– joat
14 hours ago













The problem with xdotool is the key pressed, like drag and drop with left click. If you found a solution that is working with xdotool and drag&drop, I will accept it

– Mévatlavé Kraspek
13 hours ago





The problem with xdotool is the key pressed, like drag and drop with left click. If you found a solution that is working with xdotool and drag&drop, I will accept it

– Mévatlavé Kraspek
13 hours ago













Added solution that is not working for me with xdotool and xbindkeys

– Mévatlavé Kraspek
8 hours ago







Added solution that is not working for me with xdotool and xbindkeys

– Mévatlavé Kraspek
8 hours ago












0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f497676%2fhow-to-map-mouse-keys-as-keyboard-keys-without-losingnumeric-keypad-for-linux%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
















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • 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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f497676%2fhow-to-map-mouse-keys-as-keyboard-keys-without-losingnumeric-keypad-for-linux%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Histoire des bourses de valeurs

Why is there Russian traffic in my log files?

Rename multiple files to decrement number in file name?