Hacker News new | past | comments | ask | show | jobs | submit login

I use this tool because I like to run the binary distribution of nethack from the command line inside an OS X Terminal window, and I am VERY accustomed to using the up/down/left/right arrow keys to move around (from how things used to work when I ran Windows). It seemed really hard to send that binary "hjkl" instead of up/down/left/rgiht arrow key signals any other way and it also seemed hard to compile in the desired behavior by hand (although, hmm).

I'm lazy, so I ended up just running Karabiner with this tiny private.xml: https://gist.github.com/mherdeg/4eca69637d176bc81ea19207b911...

I found that I context-switched between places where I wanted the arrow key to send hjkl (Terminal.app running the binary) and places where I did not (everywhere else). To make things slightly easier, I set up a "profile" in Terminal.app called "nethack" which uses xterm-16color, displays ANSI colors in a readable way, sets the window title to "Nethack", and launches /usr/local/bin/nethack when this profile is opened. The Karabiner private.xml setting that can be toggled on/off here ends up pretty much only rewriting arrow keys when I want them to.

This seems like kind of a crazy workaround but it was really easy to deploy.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: