spmenu-wiki/Configurable keybinds.md
2023-08-12 17:53:00 +02:00

5.3 KiB

Configurable keybinds

spmenu has since version 1.0 supported configuring keybinds and mouse binds through a config file. The default config file should have the default keybinds already.

List of valid modes

NOTE: Can be used with keybinds.

  • -1
    • Any mode
  • 0
    • Normal mode
  • 1
    • Insert mode

List of valid clicks

NOTE: Can be used with mouse binds.

  • ClickWindow
    • Clicking on the spmenu window
  • ClickPrompt
    • Clicking on the prompt
  • ClickInput
    • Clicking on the input
  • ClickLArrow
    • Clicking on the left arrow
  • ClickRArrow
    • Clicking on the right arrow
  • ClickItem
    • Clicking on the item area
  • ClickImage
    • Clicking on an image
  • ClickNumber
    • Clicking on the match count indicator
  • ClickCaps
    • Clicking on the caps lock indicator
  • ClickMode
    • Clicking on the mode indicator
  • None
    • Any click

List of valid modifiers

NOTE: Can be used with keybinds.

  • Ctrl
  • Shift
  • Super
  • Alt
  • None

These can be combined by using '+' as a separator (ie. Ctrl+Shift)

List of valid buttons

NOTE: Can be used with mouse binds

  • Left Click
  • Middle Click
  • Right Click
  • Scroll Up
  • Scroll Down

List of valid functions

NOTE: Can be used with keybinds and mouse binds.

  • moveup
    • Move up by MAX(passed argument, 1)
  • movedown
    • Move down by MAX(passed argument, 1)
  • moveleft
    • Move left by MAX(passed argument, 1)
  • moveright
    • Move right by MAX(passed argument, 1)
  • movestart
    • Move to the first item
  • moveend
    • Move to the last item
  • movenext
    • Move to the next page
  • moveprev
    • Move to the previous page
  • moveitem
    • Move to item passed argument
  • paste
    • Paste from clipboard, 0 means clipboard selection, 1 means primary selection
  • restoresel
    • Move back to the first item
  • clear
    • Clear input
  • clearins
    • Clear input text and switch to insert mode
  • viewhist
    • Toggle history and item buffer
  • moveword
    • Navigate through input text by 1 word, -1 means start, +1 means end
  • deleteword
    • Delete input text by 1 word
  • movecursor
    • Move cursor (caret) by MAX(passed argument, 1)
  • navhistory
    • Navigate through history buffer, -1 means forward, +1 means backwards
  • backspace
    • Backspace 1 character from input text
  • selectitem
    • Select the current selected item
  • quit
    • Quit spmenu
  • complete
    • Tab complete the selected item
  • setimgsize
    • Set image size to passed argument
  • defaultimg
    • Reset image size to the default
  • toggleinput
    • Toggle input
  • togglepretext
    • Toggle pretext
  • togglelarrow
    • Toggle left arrow
  • togglerarrow
    • Toggle right arrow
  • toggleitem
    • Toggle items
  • toggleprompt
    • Toggle prompt
  • togglecaps
    • Toggle caps lock indicator
  • togglepowerline
    • Toggle powerlines
  • togglecaret
    • Toggle caret (cursor)
  • togglehighlight
    • Toggle highlighting
  • togglematchcount
    • Toggle match count
  • togglemode
    • Toggle mode
  • toggleregex
    • Toggle regex mode
  • togglefuzzy
    • Toggle fuzzy matching
  • toggleimg
    • Toggle images
  • toggleimgtype
    • Toggle image type
  • flipimg
    • Flip image, 0 means vertically, 1 means horizontally
  • setimgpos
    • Move to the next image position
  • setimggaps
    • Set image gaps to passed argument
  • setlines
    • Set lines to passed argument
  • setcolumns
    • Set columns to passed argument
  • setx
    • Set X position to passed argument
  • sety
    • Set X position to passed argument
  • setw
    • Set menu width to passed argument
  • setlineheight
    • Set line height to passed argument
  • setprofile
    • Open profile menu if available
  • switchmode
    • Switch between Normal mode and Insert mode
  • selecthover
    • Output the item clicked on
  • markhover
    • Mark the item clicked on
  • screenshot
    • Take a screenshot of spmenu

List of valid arguments

NOTE: Can be used with both keybinds and mouse binds.

  • 0
  • 1 through 100
  • +1 through +100
  • -1 through -100

Please note that all functions will not accept all of these or use them properly. See 'List of valid functions' for more information.

List of valid keys

NOTE: Can be used with keybinds.

  • None
  • Space
  • Enter
  • Tab
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • !
  • "
  • #
  • $
  • %
  • &
  • '
  • (
  • )
  • *
  • +
  • ,
  • -
  • .
  • /
  • :
  • ;
  • <
  • =
  • >
  • ?
  • @
  • [
  • \\
  • ]
  • _
  • grave
  • {
  • bar
  • }
  • ~
  • F1
  • F2
  • F3
  • F4
  • F5
  • F6
  • F7
  • F8
  • F9
  • F10
  • F11
  • F12
  • PageUp
  • PageDown
  • Home
  • End
  • Delete
  • PrintScr
  • Esc
  • Pause
  • ScrollLock
  • Backspace
  • Up
  • Down
  • Left
  • Right
  • Next
  • Prior

If the key is not listed here, it may still work. If it does not, please file a bug report.

See also