KEYNAV(1) | KEYNAV(1) |
keynav - keyboard navigation tool
keynav [optional-startup-commands]
keynav is a utility for generally operating your mouse with your keyboard. The main usage is to divide the screen into sections, selecting them until you end up at the point where you want to move the mouse, or click, etc.
You can pass any valid keynav commands to keynav from the command-line. Make sure you quote things properly.
For example, to load another config file or two:
keynav "loadconfig ~/myconfigs/keynavrc,loadconfig ~/myconfig/anotherkeynavrc"
Another example: daemonize on startup:
keynav daemonize
keynav is configured by default from a config file in your home directory "~/.keynavrc"
The default configuration can be found in the "DEFAULT CONFIGURATION" section.
'#' will delimit comments. The configuration consists mostly of binding keys to keynav commands. The following to commands must appear on lines by themselves, not as key bindings.
The rest of the configuration has this format
keybinding keynav-command[,keynav-command,...]
You can have multiple commands for a single keybinding.
The way to start keynav's navigation is to use the 'start' command. Additionally, any keys with 'start' as a command will be grabbed as global hotkeys. For example, this configuration:
ctrl+semicolon start space click 1
This will make keynav grab the ctrl + semicolon keybinding globally, but it will not grab space. The space keybinding will only be active while keynav is active (after you press a key sequence that invokes start.
In case of a keyboard layout where semicolon is just reachable by pressing Shift, the activation key combination actually might not be ctrl+shift+[other character], but just ctrl+[other character], e.g. ctrl+comma instead of ctrl+shift+comma on Swiss-German or German-German layouts.
If you aren't sure what the name of your key is, you can run xev(1) and press each key you want to learn about while the xev window has focus. The output will include the keysym name (like Shift_L, or Return, etc)
Moving on, here are all the keynav commands you can use:
Movements are bounded by screen edges. See "SCREEN EDGES" for edge and multiple screen handling.
See "CUT AND MOVE VALUES" for what this value means.
See "CUT AND MOVE VALUES" for what this value means.
See "CUT AND MOVE VALUES" for what this value means.
See "CUT AND MOVE VALUES" for what this value means.
See "CUT AND MOVE VALUES" for what this value means.
See "CUT AND MOVE VALUES" for what this value means.
See "CUT AND MOVE VALUES" for what this value means.
See "CUT AND MOVE VALUES" for what this value means.
The value can be one of two formats. First, the COLUMNxROW syntax. 'cell-select 3x1' will select column 3, row 1. The second format is simply a number. The number represents the counting of the cell, starting at the top left and working right.
A visual might help. With 'grid 3x3' the following is used with cell-select:
+----------------------------------------------+ | | | | | 1x1 | 2x1 | 3x1 | | 1 | 2 | 3 | | | | | |--------------+---------------+---------------| | | | | | 1x2 | 2x2 | 3x2 | | 4 | 5 | 6 | | | | | |--------------+---------------+---------------| | | | | | 1x3 | 2x3 | 3x3 | | 7 | 8 | 9 | | | | | |----------------------------------------------|
Dragging sometimes doesn't work. I'm trying to make it more reliable. File a bug if you are interested in this feature working :)
For example, this config: 'q record'. Pressing 'q' then 'l' will start recording to the 'l' key assuming it's not already bound. Then, to stop recording, press 'q' again (the record key as configured). After that, to replay that recording, simply press playback and then 'l' while the keynav window is active.
g sh "xdotool search --name -- '- Google Chrome' windowactivate key --window 0 --clearmodifiers ctrl+l",end
The values for cuts and moves have two kinds values.
Values in the range [0,1] are taken to mean a percentage of the window's width or height. Values > 1 are taken literally as pixel units.
Some examples:
When moving the keynav window around, the window will not go outside of the screen boundaries. One exception is for multiple displays: a movement outside of the current screen can move the keynav window to the next screen if keynav things it's the right thing to do.
If a move would take you beyond the screen borders, then the window will stop moving at the edge.
clear ctrl+semicolon start Escape end ctrl+bracketleft end q record ~/.keynav_macros shift+at playback a history-back h cut-left j cut-down k cut-up l cut-right shift+h move-left shift+j move-down shift+k move-up shift+l move-right space warp,click 1,end Return warp,click 1,end semicolon warp,end w warp t windowzoom c cursorzoom 300 300 e end 1 click 1 2 click 2 3 click 3 ctrl+h cut-left ctrl+j cut-down ctrl+k cut-up ctrl+l cut-right y cut-left,cut-up u cut-right,cut-up b cut-left,cut-down n cut-right,cut-down shift+y move-left,move-up shift+u move-right,move-up shift+b move-left,move-down shift+n move-right,move-down ctrl+y cut-left,cut-up ctrl+u cut-right,cut-up ctrl+b cut-left,cut-down ctrl+n cut-right,cut-down
# Make 'v' paste things: v sh "xdotool key shift+Insert",end
See the author's keynavrc as an example, here:
http://semicomplete.googlecode.com/svn/keynav/examples/keynavrc.jordan
Related: xdotool(1)
Project site: <http://www.semicomplete.com/projects/keynav>
Google Code: <http://semicomplete.googlecode.com/>
Please send questions and comments to keynav-users@googlegroups.com. File bugs and feature requests at the following URL:
<http://code.google.com/p/semicomplete/issues/list>
Alternately, if you really prefer email, feel free to file bugs by emailing the list. What works for you :)
keynav was written by Jordan Sissel.
2021-01-17 |