After getting a replacement keyboard for my Thinkpad, the track point on my new keyboard no longer works the way I want. A lot of pressure has to be applied to the track point to control the mouse pointer (this is true even though I have created a udev rule to set the device’s sensitivity attribute to the highest). This sucks because now I have to use the track pad to move the pointer, which means taking my fingers off the home row.
Given the circumstances, I decided that the best way around this is to re-map the mouse controllers to certain keys on the keyboard. That way, I can still move the mouse pointer without taking my fingers off the home row.
So far, my plan is as follows:
- Create a keybinding in my i3 config that would launch a script. Perhaps something like:
bindsym $mod+space exec --no-startup-id /some/script/to/perform/the/remapping.sh
- Create a keybinding in my i3 config that would launch another script, this time to reset the mapping back to default.
That way, I would have two keybindings: one to switch on the “control mouse with keyboard” feature, and another one to turn if off.
The problem I’m facing now is that I’m not entirely sure how to write the scripts (since I’m such a newb). My intuition tells me that I have to use something like
xinput to do it, but my experience with using that command is limited.
So far, I only managed to use it to disable the “middle-click feature” by doing something like this:
#15 = IBM Trackpoint #14 = Synaptics Trackpad xinput set-button-map 15 1 25 3 4 5 6 7 xinput set-button-map 14 1 25 3 4 5 6 7
How do I use
xinput to re-map only the controls to move the mouse button left, right, up, and down? I’m using a thinkpad, so I’m still planning to use the click buttons to click—as in these buttons:
I just want to use normal keys to move my mouse pointer (hjkl keys, like in vim)
Does anyone have any advice?
Things I’ve tried:
- I tried to figure out the numbers corresponding to left, right, up, and down using
xinput test 15, but the numbers don’t make sense:
When I push the track point down it gives: a=(some number)
When I push the track point up, it gives : a = (some number)
When I push the track point left, it gives: a again???
But at least I know that left click = 1, right click = 3.