Skip to content

Commit

Permalink
dagascii: add more keys
Browse files Browse the repository at this point in the history
Signed-off-by: Ruslan Kuprieiev <[email protected]>
  • Loading branch information
efiop committed Oct 6, 2018
1 parent 315bbfd commit 27a96ef
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions dvc/dagascii.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,23 @@ def _do_draw(self, screen):
continue

k = event.key_code
if k == screen.KEY_DOWN:
if k == screen.KEY_DOWN or k == ord('s'):
offset_y += 1
elif k == screen.KEY_PAGE_DOWN:
elif k == screen.KEY_PAGE_DOWN or k == ord('S'):
offset_y += smaxrow
elif k == screen.KEY_UP:
elif k == screen.KEY_UP or k == ord('w'):
offset_y -= 1
elif k == screen.KEY_PAGE_UP:
elif k == screen.KEY_PAGE_UP or k == ord('W'):
offset_y -= smaxrow
elif k == screen.KEY_RIGHT:
elif k == screen.KEY_RIGHT or k == ord('d'):
offset_x += 1
elif k == screen.KEY_LEFT:
elif k == ord('D'):
offset_x += smaxcol
elif k == screen.KEY_LEFT or k == ord('a'):
offset_x -= 1
elif k == ord('q'):
elif k == ord('A'):
offset_x -= smaxcol
elif k == ord('q') or k == ord('Q'):
break

if offset_y > max_y:
Expand Down

0 comments on commit 27a96ef

Please sign in to comment.