# This is a keynavrc file. Yours should live in
# $HOME/.keynavrc
#
# Lines beginning with '#' are comments.
# Format is:
#   keysequence cmd1,cmd2,cmd3...
#
# Other special values are:
#   'clear' on a line by itself (no quotes) will erase all keybindings
#   (including the defaults)
#   'daemonize' on a line by itself (no quotes) will make keynav background
#   after parsing the configfile and having no critical errors.
#
# The 'start' command alone is handled specially, in that any key sequence
# mapped to 'start' will be grabbed when keynav starts up so you can invoke it
# to activate keynav. The remaining keys are only recognized while keynav is
# active
#
# Project page; http://www.semicomplete.com/projects/keynav

# Use 'clear' to blow away any previous keybindings
clear

# Use 'daemonize' to background ourselves.
#daemonize

# ctrl+semicolon start
shift+KP_5 start
Escape end
# KP_0 end
ctrl+bracketleft end

# Emacs keybindings
#
# b cut-left
# n cut-down
# p cut-up
# f cut-right
# y cut-left,cut-up
# u cut-right,cut-up
# b cut-left,cut-down
# n cut-right,cut-down

KP_Left cut-left
KP_Down cut-down
KP_Up cut-up
KP_Right cut-right
KP_Home cut-left,cut-up
KP_Page_Up cut-right,cut-up
KP_End cut-left,cut-down
KP_Page_Down cut-right,cut-down

shift+KP_Left move-left
shift+KP_Down move-down
shift+KP_Up move-up
shift+KP_Right move-right
shift+KP_Home move-left,move-up
shift+KP_Page_Up move-right,move-up
shift+KP_End move-left,move-down
shift+KP_Page_Down move-right,move-down

# KP_5 warp,click 1,end
KP_5 warp,click 1,end
KP_Subtract warp,click 3,end
KP_Multiply warp,click 2,end
KP_Divide warp,end

# Zoom to the current window
KP_Add windowzoom

# Zoom to the cursor location with a given height and width
KP_0 cursorzoom 200 200

# Handy for holding ctrl while using keynav:
# ctrl+h cut-left
# ctrl+j cut-down
# ctrl+k cut-up
# ctrl+l cut-right
# ctrl+y cut-left,cut-up
# ctrl+u cut-right,cut-up
# ctrl+b cut-left,cut-down
# ctrl+n cut-right,cut-down

# Record keynav actions
q record

### Example using the 'sh' command.
# Make firefox the active window
# f sh "xdotool windowactivate $(xdotool search -title -- '- Mozilla Firefox')", end
# Make a new tab in google chrome:
# t sh "xdotool windowactivate $(xdotool search --title -- '- Google Chrome' | head -1); xdotool key ctrl+t",end
# Paste
# v sh "xdotool key shift+Insert"

### Drag examples
# Start drag holding the left mouse button
#q drag 1
# Start drag holding middle mouse + control and shift
#w drag 2 ctrl+shift

### History
KP_Delete history-back

### Example of cut and move without the default values
#h cut-left .75
#j cut-down .75
#k cut-up .75
#l cut-right .75
#shift+h move-left .50
#shift+j move-down .50
#shift+k move-up .50
#shift+l move-right .50

### Example using a 2-row, 3-column grid,
# mapped to Insert/Home/PageUp/etc...
#6 grid 2x3
#Insert cell-select 1x1
#Home cell-select 1x2
#Prior cell-select 1x3   # PageUp
#Delete cell-select 2x1
#End cell-select 2x2
#Next cell-select 2x3   # PageDown

### Example using a 3x3 grid with nethack-vi keys
#ctrl+semicolon start, grid 3x3
#h cell-select 2x1      # left
#j cell-select 3x2      # down
#k cell-select 1x2      # up
#l cell-select 2x3      # right
#y cell-select 1x1      # up-left
#u cell-select 1x3      # up-right
#b cell-select 3x1      # down-left
#n cell-select 3x3      # down-right
#period cell-select 2x2 # center
