spmenu-wiki/Configurable keybinds.md

306 lines
5.3 KiB
Markdown
Raw Normal View History

# 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
2023-07-14 21:32:37 +02:00
- `None`
- Any click
## List of valid modifiers
NOTE: Can be used with keybinds.
- `Ctrl`
- `Shift`
- `Super`
- `Alt`
- `None`
2023-05-09 19:37:40 +02:00
These can be combined by using '+' as a separator (ie. Ctrl+Shift)
2023-05-09 19:37:40 +02:00
## List of valid buttons
NOTE: Can be used with mouse binds
2023-05-09 19:37:40 +02:00
- Left Click
- Middle Click
- Right Click
- Scroll Up
- Scroll Down
## List of valid functions
2023-05-09 19:37:40 +02:00
NOTE: Can be used with keybinds and mouse binds.
2023-05-09 19:37:40 +02:00
- `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
2023-08-09 20:47:04 +02:00
- `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
2023-07-22 19:12:36 +02:00
- `togglefuzzy`
- Toggle fuzzy matching
- `toggleimg`
- Toggle images
2023-08-09 05:48:19 +02:00
- `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
2023-08-12 17:36:48 +02:00
- `setx`
- Set X position to passed argument
- `sety`
- Set X position to passed argument
2023-08-12 17:53:00 +02:00
- `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
2023-07-25 00:20:43 +02:00
- `markhover`
- Mark the item clicked on
- `screenshot`
- Take a screenshot of spmenu
2023-05-09 19:37:40 +02:00
## List of valid arguments
2023-05-09 19:37:40 +02:00
NOTE: Can be used with both keybinds and mouse binds.
2023-05-09 19:37:40 +02:00
- `0`
- `1` through `100`
- `+1` through `+100`
- `-1` through `-100`
2023-05-09 19:37:40 +02:00
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
2023-05-09 19:37:40 +02:00
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
- [[spmenu.conf documentation]]
- [[binds.conf documentation]]
- spmenu(1)