Howto: Map Touchpad buttons On Keyboard

Share your own howto's etc. Not for support questions!

Howto: Map Touchpad buttons On Keyboard

Postby bester69 » 2015-06-30 00:04

If you don't have an external mouse and you dont want to destroy your touhpad buttons, and also you feel are destroying your fingers by pressing so hard the touchpad button... Why don't map this buttons on the keyboard?


Ive done a script to map click buttons on keyboard, its very confortable to use, and i've not used touchpad buttons anymore since then.


Image
share image

Mapping Windows Key funciton as left touchpad button
Mapping Contextual Key function as right touchpad button

1- mousebind.sh (script to map keyboard to touchpad buttons functions)
#!/bin/bash
sleep 15
# set XKB layout
setxkbmap -layout es
# turn on mousekeys
xkbset m
# stop mousekeys expiring after a timeout
xkbset exp =m
# map keysym to other keysym
sleep 1
xmodmap -e "keycode 133 = Pointer_Button1"
xmodmap -e "keycode 135 = Pointer_Button3"


2- normalmousebind.sh (script to restore default mapping keyboard)
#!/bin/bash
#restuara teclado
xkbset -m



So you add script 1 to startup, and enjoy :wink:

i'd recommend using middle finger, left hand for Windows Key, middle finger right hand for Contextual Key
Last edited by bester69 on 2015-07-07 00:59, edited 1 time in total.
bester69 wrote:You wont change my mind when I know Im right, Im not an ...
User avatar
bester69
 
Posts: 1485
Joined: 2015-04-02 13:15

Re: Howto: Map Touchpad buttons On Keyboard

Postby gerry » 2015-07-06 20:32

Just what I'm looking for- I have an early Acer Aspire One, and find the touchpad keys very difficult.

Two questions: what does the contextual key look like? And should

setxkbmap -layout es

be something else if I'm not a Spaniard? -layout uk, for instance? (or gb?).

gerry
gerry
Age 80- and still learning!
gerry
 
Posts: 326
Joined: 2007-09-13 07:23
Location: England

Re: Howto: Map Touchpad buttons On Keyboard

Postby bester69 » 2015-07-07 01:00

gerry wrote:Just what I'm looking for- I have an early Acer Aspire One, and find the touchpad keys very difficult.

Two questions: what does the contextual key look like? And should

setxkbmap -layout es

be something else if I'm not a Spaniard? -layout uk, for instance? (or gb?).

gerry


Gerry, iadded a pic so you see the keys, i think -layout must be uk or en for english
bester69 wrote:You wont change my mind when I know Im right, Im not an ...
User avatar
bester69
 
Posts: 1485
Joined: 2015-04-02 13:15

Re: Howto: Map Touchpad buttons On Keyboard

Postby gerry » 2015-07-07 06:49

Thanks.
gerry
Age 80- and still learning!
gerry
 
Posts: 326
Joined: 2007-09-13 07:23
Location: England

Re: Howto: Map Touchpad buttons On Keyboard

Postby gerry » 2015-07-07 11:59

Can't get it to work.
Error reported: xkbset command not found.

EDIT: found the answer- apt-get install xkbset
(Actually I used Synaptic.)
EDIT2: For me , choice of country for layout is gb, not uk.
and EDIT3, could you please tell me exactly where the script goes to work automaticly? At the present I'm running it manually.

gerry
gerry
Age 80- and still learning!
gerry
 
Posts: 326
Joined: 2007-09-13 07:23
Location: England

Re: Howto: Map Touchpad buttons On Keyboard

Postby bester69 » 2015-07-08 00:58

gerry wrote:Can't get it to work.
Error reported: xkbset command not found.

EDIT: found the answer- apt-get install xkbset
(Actually I used Synaptic.)
EDIT2: For me , choice of country for layout is gb, not uk.
and EDIT3, could you please tell me exactly where the script goes to work automaticly? At the present I'm running it manually.

gerry


jejej, i suppose it goes in the startup,i use kde, i put it there, i hope you enjoi it, cos ive been using it from 2 years, and i've not need it a mouse since then.

seriously i love it like this, sometimes easiest thing are most usefull. :wink: Someone should tell to everybody
bester69 wrote:You wont change my mind when I know Im right, Im not an ...
User avatar
bester69
 
Posts: 1485
Joined: 2015-04-02 13:15

Re: Howto: Map Touchpad buttons On Keyboard

Postby bester69 » 2016-07-04 23:37

This, deserve rebind ,


Still using it,
this is my best invention , I think I should patent it :) :)
bester69 wrote:You wont change my mind when I know Im right, Im not an ...
User avatar
bester69
 
Posts: 1485
Joined: 2015-04-02 13:15


Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable