mirror of https://github.com/MidnightCommander/mc
Ticket #3075: (midnight_callback): make alt-enter, ctrl-enter, ctrl-shift-enter bindable.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
5313f3917a
commit
4a0f265d95
|
@ -205,6 +205,8 @@ static name_keymap_t command_names[] = {
|
|||
{"SplitLess", CK_SplitLess},
|
||||
{"PutCurrentPath", CK_PutCurrentPath},
|
||||
{"PutOtherPath", CK_PutOtherPath},
|
||||
{"PutCurrentSelected", CK_PutCurrentSelected},
|
||||
{"PutCurrentFullSelected", CK_PutCurrentFullSelected},
|
||||
{"PutCurrentTagged", CK_PutCurrentTagged},
|
||||
{"PutOtherTagged", CK_PutOtherTagged},
|
||||
{"Select", CK_Select},
|
||||
|
|
|
@ -178,6 +178,8 @@ enum
|
|||
CK_LinkSymbolicRelative,
|
||||
CK_PutCurrentPath,
|
||||
CK_PutOtherPath,
|
||||
CK_PutCurrentSelected,
|
||||
CK_PutCurrentFullSelected,
|
||||
CK_PutCurrentTagged,
|
||||
CK_PutOtherTagged,
|
||||
CK_Select,
|
||||
|
|
|
@ -32,6 +32,8 @@ SplitLess = alt-shift-left
|
|||
Shell = ctrl-o
|
||||
PutCurrentPath = alt-a
|
||||
PutOtherPath = alt-shift-a
|
||||
PutCurrentSelected = alt-enter; ctrl-enter
|
||||
PutCurrentFullSelected = ctrl-shift-enter
|
||||
ViewFiltered = alt-exclamation
|
||||
Select = kpplus
|
||||
Unselect = kpminus
|
||||
|
|
|
@ -32,6 +32,8 @@ SplitLess = alt-shift-left
|
|||
Shell = ctrl-o
|
||||
PutCurrentPath = alt-a
|
||||
PutOtherPath = alt-shift-a
|
||||
PutCurrentSelected = alt-enter; ctrl-enter
|
||||
PutCurrentFullSelected = ctrl-shift-enter
|
||||
ViewFiltered = alt-exclamation
|
||||
Select = kpplus
|
||||
Unselect = kpminus
|
||||
|
|
|
@ -781,7 +781,7 @@ put_other_link (void)
|
|||
|
||||
/** Insert the selected file name into the input line */
|
||||
static void
|
||||
put_prog_name (void)
|
||||
put_current_selected (void)
|
||||
{
|
||||
const char *tmp;
|
||||
|
||||
|
@ -1139,6 +1139,13 @@ midnight_execute_cmd (Widget * sender, long command)
|
|||
case CK_PutCurrentPath:
|
||||
midnight_put_panel_path (current_panel);
|
||||
break;
|
||||
case CK_PutCurrentSelected:
|
||||
put_current_selected ();
|
||||
break;
|
||||
case CK_PutCurrentFullSelected:
|
||||
midnight_put_panel_path (current_panel);
|
||||
put_current_selected ();
|
||||
break;
|
||||
case CK_PutCurrentLink:
|
||||
put_current_link ();
|
||||
break;
|
||||
|
@ -1476,21 +1483,6 @@ midnight_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void
|
|||
cmdline->point = 0;
|
||||
}
|
||||
|
||||
/* Ctrl-Enter and Alt-Enter */
|
||||
if (((parm & ~(KEY_M_CTRL | KEY_M_ALT)) == '\n') && (parm & (KEY_M_CTRL | KEY_M_ALT)))
|
||||
{
|
||||
put_prog_name ();
|
||||
return MSG_HANDLED;
|
||||
}
|
||||
|
||||
/* Ctrl-Shift-Enter */
|
||||
if (parm == (KEY_M_CTRL | KEY_M_SHIFT | '\n'))
|
||||
{
|
||||
midnight_put_panel_path (current_panel);
|
||||
put_prog_name ();
|
||||
return MSG_HANDLED;
|
||||
}
|
||||
|
||||
if ((!mc_global.tty.alternate_plus_minus
|
||||
|| !(mc_global.tty.console_flag != '\0' || mc_global.tty.xterm_flag)) && !quote
|
||||
&& !current_panel->searching)
|
||||
|
|
|
@ -100,6 +100,8 @@ static const global_keymap_ini_t default_main_keymap[] = {
|
|||
/* Copy useful information to the command line */
|
||||
{"PutCurrentPath", "alt-a"},
|
||||
{"PutOtherPath", "alt-shift-a"},
|
||||
{"PutCurrentSelected", "alt-enter; ctrl-enter"},
|
||||
{"PutCurrentFullSelected", "ctrl-shift-enter"},
|
||||
{"CdQuick", "alt-c"},
|
||||
/* To access the directory hotlist */
|
||||
{"HotList", "ctrl-backslash"},
|
||||
|
|
Loading…
Reference in New Issue