Closed Jengah closed 5 years ago
Didn't notice you recently merged in some refactors to key registration. Will rebase and make necessary changes.
This should be easier with #23 :)
Just do something like:
@keyhandler.register(ARROW_UP_KEY)
@keyhandler.register(VIM_UP_KEY)
def moveUp(self):
#...
Since PR#23 already supports this (which is more flexible than hard-coding) I will close this PR.
Adds vi-like navigation for feature request in https://github.com/Mckinsey666/bullet/issues/13. Although the request only asked for changes to the
Bullet
andCheck
classes, I also extended it to theScrollBar
class as well, as it feels just as applicable.This was tested on macOS High Sierra and Ubuntu 16.04 (with a docker image). I don't have the bandwidth to know/test this in Windows, but nothing about this should introduce a breaking change in Windows.
Although I did my best to stifle my auto-formatter/linter, it looks like some trailing spaces were cut off automatically in some places. If this is a problem, I can fix it, but I do agree with and recommend the adoption a code-formatter as mentioned in https://github.com/Mckinsey666/bullet/issues/17