rofi-keys(5) File Formats Manual rofi-keys(5)

# [NAME](#NAME)

**rofi keys** - Rofi Key and Mouse bindings

# [DESCRIPTION](#DESCRIPTION)

**rofi** supports overriding of any of it key and mouse binding.

# [Setting binding](#Setting_binding)

Bindings can be done on the commandline (-{bindingname}):

```
rofi -show run -kb-accept-entry 'Control+Shift+space'
    
```

or via the configuration file:

```
configuration {


  kb-accept-entry: "Control+Shift+space";
}
    
```

The key can be set by its name (see above) or its keycode:

```
configuration {


  kb-accept-entry: "Control+Shift+[65]";
}
    
```

An easy way to look up keycode is [xev(1)](/man/enterprise-packages/rofi/xev.1).

Multiple keys can be specified for an action as a comma separated list:

```
configuration {


  kb-accept-entry: "Control+Shift+space,Return";
}
    
```

By Default **rofi** reacts on pressing, to act on the release of all keys prepend the binding with **!**:

```
configuration {


  kb-accept-entry: "!Control+Shift+space,Return";
}
    
```

# [Unsetting a binding](#Unsetting_a_binding)

To unset a binding, pass an empty string.

```
configuration {


  kb-clear-line: "";
}
    
```

# [Keyboard Bindings](#Keyboard_Bindings)

[**kb-primary-paste**](#kb)

Paste primary selection

Default: Control+V,Shift+Insert

[**kb-secondary-paste**](#kb~2)

Paste clipboard

Default: Control+v,Insert

[**kb-secondary-copy**](#kb~3)

Copy current selection to clipboard

Default: Control+c

[**kb-clear-line**](#kb~4)

Clear input line

Default: Control+w

[**kb-move-front**](#kb~5)

Beginning of line

Default: Control+a

[**kb-move-end**](#kb~6)

End of line

Default: Control+e

[**kb-move-word-back**](#kb~7)

Move back one word

Default: Alt+b,Control+Left

[**kb-move-word-forward**](#kb~8)

Move forward one word

Default: Alt+f,Control+Right

[**kb-move-char-back**](#kb~9)

Move back one char

Default: Left,Control+b

[**kb-move-char-forward**](#kb~10)

Move forward one char

Default: Right,Control+f

[**kb-remove-word-back**](#kb~11)

Delete previous word

Default: Control+Alt+h,Control+BackSpace

[**kb-remove-word-forward**](#kb~12)

Delete next word

Default: Control+Alt+d

[**kb-remove-char-forward**](#kb~13)

Delete next char

Default: Delete,Control+d

[**kb-remove-char-back**](#kb~14)

Delete previous char

Default: BackSpace,Shift+BackSpace,Control+h

[**kb-remove-to-eol**](#kb~15)

Delete till the end of line

Default: Control+k

[**kb-remove-to-sol**](#kb~16)

Delete till the start of line

Default: Control+u

[**kb-accept-entry**](#kb~17)

Accept entry

Default: Control+j,Control+m,Return,KP\_Enter

[**kb-accept-custom**](#kb~18)

Use entered text as command (in ssh/run modes)

Default: Control+Return

[**kb-accept-custom-alt**](#kb~19)

Use entered text as command (in ssh/run modes)

Default: Control+Shift+Return

[**kb-accept-alt**](#kb~20)

Use alternate accept command.

Default: Shift+Return

[**kb-delete-entry**](#kb~21)

Delete entry from history

Default: Shift+Delete

[**kb-mode-next**](#kb~22)

Switch to the next mode.

Default: Shift+Right,Control+Tab

[**kb-mode-previous**](#kb~23)

Switch to the previous mode.

Default: Shift+Left,Control+ISO\_Left\_Tab

[**kb-mode-complete**](#kb~24)

Start completion for mode.

Default: Control+l

[**kb-row-left**](#kb~25)

Go to the previous column

Default: Control+Page\_Up

[**kb-row-right**](#kb~26)

Go to the next column

Default: Control+Page\_Down

[**kb-row-up**](#kb~27)

Select previous entry

Default: Up,Control+p

[**kb-row-down**](#kb~28)

Select next entry

Default: Down,Control+n

[**kb-row-tab**](#kb~29)

Go to next row, if one left, accept it, if no left next mode.

Default:

[**kb-element-next**](#kb~30)

Go to next row.

Default: Tab

[**kb-element-prev**](#kb~31)

Go to previous row.

Default: ISO\_Left\_Tab

[**kb-page-prev**](#kb~32)

Go to the previous page

Default: Page\_Up

[**kb-page-next**](#kb~33)

Go to the next page

Default: Page\_Down

[**kb-row-first**](#kb~34)

Go to the first entry

Default: Home,KP\_Home

[**kb-row-last**](#kb~35)

Go to the last entry

Default: End,KP\_End

[**kb-row-select**](#kb~36)

Set selected item as input text

Default: Control+space

[**kb-screenshot**](#kb~37)

Take a screenshot of the rofi window

Default: Alt+S

[**kb-ellipsize**](#kb~38)

Toggle between ellipsize modes for displayed data

Default: Alt+period

[**kb-toggle-case-sensitivity**](#kb~39)

Toggle case sensitivity

Default: grave,dead\_grave

[**kb-toggle-sort**](#kb~40)

Toggle filtered menu sort

Default: Alt+grave

[**kb-cancel**](#kb~41)

Quit rofi

Default: Escape,Control+g,Control+bracketleft

[**kb-custom-1**](#kb~42)

Custom keybinding 1

Default: Alt+1

[**kb-custom-2**](#kb~43)

Custom keybinding 2

Default: Alt+2

[**kb-custom-3**](#kb~44)

Custom keybinding 3

Default: Alt+3

[**kb-custom-4**](#kb~45)

Custom keybinding 4

Default: Alt+4

[**kb-custom-5**](#kb~46)

Custom Keybinding 5

Default: Alt+5

[**kb-custom-6**](#kb~47)

Custom keybinding 6

Default: Alt+6

[**kb-custom-7**](#kb~48)

Custom Keybinding 7

Default: Alt+7

[**kb-custom-8**](#kb~49)

Custom keybinding 8

Default: Alt+8

[**kb-custom-9**](#kb~50)

Custom keybinding 9

Default: Alt+9

[**kb-custom-10**](#kb~51)

Custom keybinding 10

Default: Alt+0

[**kb-custom-11**](#kb~52)

Custom keybinding 11

Default: Alt+exclam

[**kb-custom-12**](#kb~53)

Custom keybinding 12

Default: Alt+at

[**kb-custom-13**](#kb~54)

Custom keybinding 13

Default: Alt+numbersign

[**kb-custom-14**](#kb~55)

Custom keybinding 14

Default: Alt+dollar

[**kb-custom-15**](#kb~56)

Custom keybinding 15

Default: Alt+percent

[**kb-custom-16**](#kb~57)

Custom keybinding 16

Default: Alt+dead\_circumflex

[**kb-custom-17**](#kb~58)

Custom keybinding 17

Default: Alt+ampersand

[**kb-custom-18**](#kb~59)

Custom keybinding 18

Default: Alt+asterisk

[**kb-custom-19**](#kb~60)

Custom Keybinding 19

Default: Alt+parenleft

[**kb-select-1**](#kb~61)

Select row 1

Default: Super+1

[**kb-select-2**](#kb~62)

Select row 2

Default: Super+2

[**kb-select-3**](#kb~63)

Select row 3

Default: Super+3

[**kb-select-4**](#kb~64)

Select row 4

Default: Super+4

[**kb-select-5**](#kb~65)

Select row 5

Default: Super+5

[**kb-select-6**](#kb~66)

Select row 6

Default: Super+6

[**kb-select-7**](#kb~67)

Select row 7

Default: Super+7

[**kb-select-8**](#kb~68)

Select row 8

Default: Super+8

[**kb-select-9**](#kb~69)

Select row 9

Default: Super+9

[**kb-select-10**](#kb~70)

Select row 10

Default: Super+0

[**kb-entry-history-up**](#kb~71)

Go up in the entry history.

Default: Control+Up

[**kb-entry-history-down**](#kb~72)

Go down in the entry history.

Default: Control+Down

[**kb-matcher-up**](#kb~73)

Select the next matcher.

Default: Super+equal

[**kb-matcher-down**](#kb~74)

Select the previous matcher.

Default: Super+minus

# [Mouse Bindings](#Mouse_Bindings)

[**ml-row-left**](#ml)

Go to the previous column

Default: ScrollLeft

[**ml-row-right**](#ml~2)

Go to the next column

Default: ScrollRight

[**ml-row-up**](#ml~3)

Select previous entry

Default: ScrollUp

[**ml-row-down**](#ml~4)

Select next entry

Default: ScrollDown

[**me-select-entry**](#me)

Select hovered row

Default: MousePrimary

[**me-accept-entry**](#me~2)

Accept hovered row

Default: MouseDPrimary

[**me-accept-custom**](#me~3)

Accept hovered row with custom action

Default: Control+MouseDPrimary

# [Mouse key bindings](#Mouse_key_bindings)

The following mouse buttons can be bound:

- **Primary**: Primary (Left) mouse button click.
- **Secondary**: Secondary (Right) mouse button click.
- **Middle**: Middle mouse button click.
- **Forward**: The forward mouse button.
- **Back**: The back mouse button.
- **ExtraN**: The N’the mouse button. (Depending on mouse support).

The Identifier is constructed as follow:

[**Mouse&lt;D&gt;&lt;Button&gt;**](#Mouse_D__Button_)

- **D** indicates optional Double press.
- **Button** is the button name.

So **MouseDPrimary** is Primary (**Left**) mouse button double click.

# [SEE ALSO](#SEE_ALSO)

[rofi(1)](/man/enterprise-packages/rofi/rofi.1), [rofi-sensible-terminal(1)](/man/enterprise-packages/rofi/rofi-sensible-terminal.1), [rofi-theme(5)](/man/enterprise-packages/rofi/rofi-theme.5), [rofi-script(5)](/man/enterprise-packages/rofi/rofi-script.5)

# [AUTHOR](#AUTHOR)

Qball Cow [qball@gmpclient.org](mailto:qball@gmpclient.org)

Rasmus Steinke [rasi@xssn.at](mailto:rasi@xssn.at)

Morgane Glidic [sardemff7+rofi@sardemff7.net](mailto:sardemff7+rofi@sardemff7.net)

Original code based on work by: Sean Pringle [sean.pringle@gmail.com](mailto:sean.pringle@gmail.com)

For a full list of authors, check the AUTHORS file.

rofi

---

Document: rofi-keys(5) from rofi 2.0.0-r0 (Chainguard OS)
