Skip to content

Commit

Permalink
Ctrl+{hjkl} Moving cursor (but not in text) (#492)
Browse files Browse the repository at this point in the history
  • Loading branch information
RannyArcher authored Jun 14, 2023
1 parent 0b87d6c commit faa76de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/inputs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 2 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,15 @@ int main(int argc, char** argv)
update = true;
}
break;
case TB_KEY_CTRL_K:
case TB_KEY_ARROW_UP:
if (active_input > 0)
{
--active_input;
update = true;
}
break;
case TB_KEY_CTRL_J:
case TB_KEY_ARROW_DOWN:
if (active_input < 2)
{
Expand Down

0 comments on commit faa76de

Please sign in to comment.