1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-11 13:50:48 -05:00

New keybinding Ctrl-Shift-Enter (#874)

This function combines accept-custom with the functionality to start
the command in terminal

Co-authored-by: Markus Gräb <m_graeb11@cs.uni-kl.de>
Co-authored-by: Dave Davenport <DaveDavenport@users.noreply.github.com>
This commit is contained in:
Markus Gräb 2021-06-15 14:43:30 +02:00 committed by Dave Davenport
parent 1f26e45f80
commit 26db739120
4 changed files with 10 additions and 0 deletions

View file

@ -789,6 +789,7 @@ Please see **rofi-theme(5)** manpage for more information on theming.
* `Ctrl-Page Down`: Go to next column
* `Ctrl-Enter`: Use entered text as a command (in `ssh/run modi`)
* `Shift-Enter`: Launch the application in a terminal (in run mode)
* `Ctrl-Shift-Enter`: As Ctrl-Enter and run the command in terminal (in run mode)
* `Shift-Enter`: Return the selected entry and move to the next item while keeping **rofi** open. (in dmenu)
* `Shift-Right`: Switch to the next mode. The list can be customized with the `-switchers` argument.
* `Shift-Left`: Switch to the previous mode. The list can be customized with the `-switchers` argument.

View file

@ -91,6 +91,7 @@ typedef enum
ACCEPT_ENTRY,
ACCEPT_ALT,
ACCEPT_CUSTOM,
ACCEPT_CUSTOM_ALT,
MODE_NEXT,
MODE_COMPLETE,
MODE_PREVIOUS,

View file

@ -62,6 +62,7 @@ ActionBindingEntry rofi_bindings[] =
{ .id = REMOVE_TO_SOL, .name = "kb-remove-to-sol", .binding = "Control+u", .comment = "Delete till the start of line" },
{ .id = ACCEPT_ENTRY, .name = "kb-accept-entry", .binding = "Control+j,Control+m,Return,KP_Enter", .comment = "Accept entry" },
{ .id = ACCEPT_CUSTOM, .name = "kb-accept-custom", .binding = "Control+Return", .comment = "Use entered text as command (in ssh/run modi)" },
{ .id = ACCEPT_CUSTOM_ALT, .name = "kb-accept-custom-alt", .binding = "Control+Shift+Return", .comment = "Use entered text as command (in ssh/run modi)" },
{ .id = ACCEPT_ALT, .name = "kb-accept-alt", .binding = "Shift+Return", .comment = "Use alternate accept command." },
{ .id = DELETE_ENTRY, .name = "kb-delete-entry", .binding = "Shift+Delete", .comment = "Delete entry from history" },
{ .id = MODE_NEXT, .name = "kb-mode-next", .binding = "Shift+Right,Control+Tab", .comment = "Switch to the next mode." },

View file

@ -1436,6 +1436,13 @@ static void rofi_view_trigger_global_action ( KeyBindingAction action )
state->quit = TRUE;
break;
}
case ACCEPT_CUSTOM_ALT:
{
state->selected_line = UINT32_MAX;
state->retv = MENU_CUSTOM_INPUT | MENU_CUSTOM_ACTION;
state->quit = TRUE;
break;
}
case ACCEPT_ENTRY:
{
// If a valid item is selected, return that..