taizilongxu / douban.fm

:radio: douban.fm based on Python
MIT License
786 stars 190 forks source link

Support arrow keys? #63

Closed Hexcles closed 9 years ago

Hexcles commented 9 years ago

HJKL might not be intuitive enough for non-vim users. Adding arrow key support is acceptable, I think.

shiznet commented 9 years ago

提供一套非vim用户的配置文件即可吧。

taizilongxu commented 9 years ago

刚才试了下OSX的getch,方向键键入后会连续传入3个ascii码,上下左右分别包含ABCD,这里偷懒一下直接判断AB来判断上下键了.

@shiznet 非vim用户提供个上下键就行了吧,其他的都正常

Hexcles commented 9 years ago

我这儿Linux看起来方向键一切正常了。

Hexcles commented 9 years ago

这个ABCD的hack看起来是挺黑的……加了个注释。问题应该不大就是了。