keys: add Shift+End to reset scroll. Closes T3582
This commit is contained in:
parent
7d09373c56
commit
9e80988f5a
1
README
1
README
|
@ -41,6 +41,7 @@ Shift+PgDn = Scroll 1 page down
|
||||||
Shift+Up = Scroll 1 line up
|
Shift+Up = Scroll 1 line up
|
||||||
Shift+Down = Scroll 1 line down
|
Shift+Down = Scroll 1 line down
|
||||||
Shift+Home = Scroll to the top of the backlog
|
Shift+Home = Scroll to the top of the backlog
|
||||||
|
Shift+End = Reset scroll
|
||||||
Shift+Left = switch focus to previous terminal inside a window
|
Shift+Left = switch focus to previous terminal inside a window
|
||||||
Shift+Right = switch focus to next terminal inside a window
|
Shift+Right = switch focus to next terminal inside a window
|
||||||
Shift+Insert = Paste Clipboard (ctrl+v/c) selection
|
Shift+Insert = Paste Clipboard (ctrl+v/c) selection
|
||||||
|
|
|
@ -200,6 +200,10 @@ Scroll terminology one line down
|
||||||
Scroll terminology to the top of the backlog
|
Scroll terminology to the top of the backlog
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
.B Shift+End
|
||||||
|
Reset scroll in terminology.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
.B Shift+Left
|
.B Shift+Left
|
||||||
Switch focus to previous terminal inside a window when using splits, or the
|
Switch focus to previous terminal inside a window when using splits, or the
|
||||||
previous tab.
|
previous tab.
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include "col.h"
|
#include "col.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#define CONF_VER 13
|
#define CONF_VER 14
|
||||||
|
|
||||||
#define LIM(v, min, max) {if (v >= max) v = max; else if (v <= min) v = min;}
|
#define LIM(v, min, max) {if (v >= max) v = max; else if (v <= min) v = min;}
|
||||||
|
|
||||||
|
@ -365,6 +365,7 @@ _add_default_keys(Config *config)
|
||||||
ADD_KB("Left", 0, 0, 1, 0, "term_prev");
|
ADD_KB("Left", 0, 0, 1, 0, "term_prev");
|
||||||
ADD_KB("Right", 0, 0, 1, 0, "term_next");
|
ADD_KB("Right", 0, 0, 1, 0, "term_next");
|
||||||
ADD_KB("Home", 0, 0, 1, 0, "top_backlog");
|
ADD_KB("Home", 0, 0, 1, 0, "top_backlog");
|
||||||
|
ADD_KB("End", 0, 0, 1, 0, "reset_scroll");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -607,6 +608,9 @@ config_load(const char *key)
|
||||||
case 12:
|
case 12:
|
||||||
_add_key(config, "Home", 0, 0, 1, 0, "top_backlog");
|
_add_key(config, "Home", 0, 0, 1, 0, "top_backlog");
|
||||||
/*pass through*/
|
/*pass through*/
|
||||||
|
case 13:
|
||||||
|
_add_key(config, "End", 0, 0, 1, 0, "reset_scroll");
|
||||||
|
/*pass through*/
|
||||||
case CONF_VER: /* 13 */
|
case CONF_VER: /* 13 */
|
||||||
config->version = CONF_VER;
|
config->version = CONF_VER;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -615,6 +615,18 @@ cb_scroll_top_backlog(Evas_Object *termio_obj)
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
cb_scroll_reset(Evas_Object *termio_obj)
|
||||||
|
{
|
||||||
|
Termpty *ty = termio_pty_get(termio_obj);
|
||||||
|
|
||||||
|
if (!ty || ty->altbuf)
|
||||||
|
return EINA_FALSE;
|
||||||
|
|
||||||
|
termio_scroll_set(termio_obj, 0);
|
||||||
|
return EINA_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static Shortcut_Action _actions[] =
|
static Shortcut_Action _actions[] =
|
||||||
{
|
{
|
||||||
|
@ -624,6 +636,7 @@ static Shortcut_Action _actions[] =
|
||||||
{"one_line_up", gettext_noop("Scroll one line up"), cb_scroll_up_line},
|
{"one_line_up", gettext_noop("Scroll one line up"), cb_scroll_up_line},
|
||||||
{"one_line_down", gettext_noop("Scroll one line down"), cb_scroll_down_line},
|
{"one_line_down", gettext_noop("Scroll one line down"), cb_scroll_down_line},
|
||||||
{"top_backlog", gettext_noop("Go to the top of the backlog"), cb_scroll_top_backlog},
|
{"top_backlog", gettext_noop("Go to the top of the backlog"), cb_scroll_top_backlog},
|
||||||
|
{"reset_scroll", gettext_noop("Reset scroll"), cb_scroll_reset},
|
||||||
|
|
||||||
{"group", gettext_noop("Copy/Paste"), NULL},
|
{"group", gettext_noop("Copy/Paste"), NULL},
|
||||||
{"copy_primary", gettext_noop("Copy selection to Primary buffer"), cb_copy_primary},
|
{"copy_primary", gettext_noop("Copy selection to Primary buffer"), cb_copy_primary},
|
||||||
|
|
Loading…
Reference in New Issue