Ctrl+{hjkl} Moving cursor (but not in text)

This commit is contained in:
Ranny Archer 2023-03-15 23:58:50 +01:00
parent c64f806a68
commit 5c391ab424
2 changed files with 4 additions and 2 deletions

View File

@ -15,11 +15,11 @@ void handle_desktop(void* input_struct, struct tb_event* event)
if ((event != NULL) && (event->type == TB_EVENT_KEY))
{
if (event->key == TB_KEY_ARROW_LEFT)
if (event->key == TB_KEY_ARROW_LEFT || (event->key == TB_KEY_CTRL_H))
{
input_desktop_right(target);
}
else if (event->key == TB_KEY_ARROW_RIGHT)
else if (event->key == TB_KEY_ARROW_RIGHT || (event->key == TB_KEY_CTRL_L))
{
input_desktop_left(target);
}

View File

@ -240,6 +240,7 @@ int main(int argc, char** argv)
update = true;
}
break;
case TB_KEY_CTRL_K:
case TB_KEY_ARROW_UP:
if (active_input > 0)
{
@ -247,6 +248,7 @@ int main(int argc, char** argv)
update = true;
}
break;
case TB_KEY_CTRL_J:
case TB_KEY_ARROW_DOWN:
if (active_input < 2)
{