Topic: [howto] Click the mouse cursor with your keyboard

Do you like your tiling wm? Your vi-like navigation? Do you want to click the mouse cursor, with your keyboard?

Sure you do! Especially when there are web sites that steal your cursor focus, and stops your fingers from being keyboard-happy.

Keynav let's us click the mouse cursor via the keyboard smile

The version in the repos (version 0.20100403.2754-1) is buggy, in that the left-click does not seem to work in some cases; like on my Openbox machine. So we compile the latest.

Get the sources for keynav and it's dependency, xdotool:

xdotool - https://github.com/jordansissel/xdotool
keynav - https://github.com/jordansissel/keynav

Build the xdotool dependency:

tar -xvf xdotool* && cd xdotool*

# build
make && sudo make install

build keynav:

tar -xvf keynav* && cd keynav*

# build
make

# copy the binary to our local system path
sudo cp keynav /usr/local/bin/

# copy the config file into our home
cp keynavrc ~/.keynavrc

.keynavrc contains all the keybindings for your reading pleasure. By default [ctrl+semicolon] to start keynav, with hjkl movement to position the mouse cursor, [space] to click and [semicolon] to hover.

One suggestion I can make in .keynavrc, is the bindings for keys 1, 2 and 3 which click left, middle and right respectively. They need to be rebound to work as we expect:

1 warp,click 1,end
2 warp,click 2,end
3 warp,click 3,end

Enjoy big_smile

Last edited by kbmonkey (2012-02-06 15:59:37)

Re: [howto] Click the mouse cursor with your keyboard

i don't think i'll ever use this, but i'm sure somebody will smile
i guess that's why your name is 'kbmonkey' big_smile

Re: [howto] Click the mouse cursor with your keyboard

I guess so lol I simply cannot use trackpads on laptops/netbooks. I noticed that Mac trackpads behave very well in comparison, they obviously have good hardware and research behind them.

Re: [howto] Click the mouse cursor with your keyboard

^ i agree with you on the trackpads. they can be a pain. which is why i just use an external USB mouse on my laptop. however, i never take my laptop anywhere so i don't have to worry about what i'd use for a mouse when i'm on the train or something.