Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,12 @@ bool Panel_onKey(Panel* this, int key) {
switch (key) {
case KEY_DOWN:
case KEY_CTRL('N'):
case 'j':
this->selected++;
break;
case KEY_UP:
case KEY_CTRL('P'):
case 'k':
this->selected--;
break;
#ifdef KEY_C_DOWN
Expand All @@ -403,13 +405,15 @@ bool Panel_onKey(Panel* this, int key) {
#endif
case KEY_LEFT:
case KEY_CTRL('B'):
case 'h':
if (this->scrollH > 0) {
this->scrollH -= MAX(CRT_scrollHAmount, 0);
this->needsRedraw = true;
}
break;
case KEY_RIGHT:
case KEY_CTRL('F'):
case 'l':
this->scrollH += CRT_scrollHAmount;
this->needsRedraw = true;
break;
Expand Down
7 changes: 2 additions & 5 deletions ScreenManager.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,9 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
case 'j': ch = KEY_DOWN; break;
case 'k': ch = KEY_UP; break;
case 'l': ch = KEY_RIGHT; break;
case KEY_LEFT: ch = 'h'; break;
case KEY_DOWN: ch = 'j'; break;
case KEY_UP: ch = 'k'; break;
case KEY_RIGHT: ch = 'l'; break;
case 'H': ch = 'h'; break;
case 'J': ch = 'j'; break;
case 'K': ch = 'k'; break;
case 'J': ch = 'K'; break;
case 'L': ch = 'l'; break;
}
}
Expand Down