summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorMarkus Gräb <markus.graeb@gmail.com>2021-06-15 14:43:30 +0200
committerGitHub <noreply@github.com>2021-06-15 14:43:30 +0200
commit4fd4fb89af7e1a73427edb46035f640cf267fdc7 (patch)
tree0122a2cc3f498717338e0a1ef2e22e901164d467 /source
parent44140ac5b43a62805a03d1ab7bd9c7e23955e75d (diff)
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>
Diffstat (limited to 'source')
-rw-r--r--source/keyb.c1
-rw-r--r--source/view.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/source/keyb.c b/source/keyb.c
index ff71f193..edda3b75 100644
--- a/source/keyb.c
+++ b/source/keyb.c
@@ -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." },
diff --git a/source/view.c b/source/view.c
index f9aa21f9..e419b000 100644
--- a/source/view.c
+++ b/source/view.c
@@ -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..