Friday, October 14, 2011

The trouble with notebook keyboards

Folks, I need your help and your feedback.

Over the past couple of days I felt more and more troubled about the keyboards mappings for JADE commands. The problem with "cursor up" being mapped to "yes" in confirmation questions is just the proverbial tip of the iceberg. Please give me some feedback on the following question:

What do you consider to be a good (or even better: great) keyboard layout for roguelike games to be played on notebooks? Do you even use notebooks to play ADOM and JADE?

Personally I am using nothing but notebooks but I greatly miss my numerical keypad (and yes, I know, there are extensions and all but that runs contrary to being mobile in my book).

With ADOM I was a happy user of the numerical keyboard for movement and the normal keyboard for everything else. With JADE and my notebook I no longer have that and I usually use the cursor keys to move and the rest of the keyboard for everything else. But that means that I most of the time loose four directions (NE, SE, SW, NW) which is not good for a tactical game.

I know I could use the JADE letter movement bindings but I don't like them much personally.

The current mapping for the movement keys on the letter keyboard are
  • t for NW
  • z (and y - due to the fact that both keys are interchangeable depending on your keyboard) for N
  • u for NE
  • g for W
  • h (and .) for "wait"
  • j for E
  • b for SW
  • n for S
  • m for SE
That combination was chosen because
  • it allows you to use "i" for inventory
  • it allows you to use your right hand for movement
But I feel it has more problems than solutions, e.g.
  • many important keys are no longer available (e.g. z for zap or t for throw/shoot)
  • we have the problem with 'y' and 'z' - which partially is a problem with the way key input currently works internally. I might be able to fix that with some effort.
  • it doesn't feel intuitive to me.
Are there better ways to define movement keys out there? What do you think? What are other roguelikes doing? Does it matter at all? Please let me know!

33 comments:

  1. I always liked having the vim style movement keys available to me. I use the arrows whenever possible and use the alternative vim keys when I truly need diagonal movement. Auto walking type keys mitigate the need for most manual diagonal movement when finding a short walking route without encounters is a necessity.

    See Brogue's keybindings for an example. It also helps that the creator took a limited approach to generic commands, using a single 'w' for wear or wield and 'a' to apply (aka use) a potion, food, wand, stave, or scroll instead of having separate commands to quaff, eat, zap, and read.

    ReplyDelete
  2. I think more important than the particular way of defining it by default is letting the user configure it. If users have a choice, it won't be so much of a problem even if some of us don't like the defaults.

    I personally will be happy with whatever you do as long as I can set the direction keys to a bunch of letters placed similarly to the keys in a numeric keypad... I can't stand the famous "vi keys", they feel totally unintuitive to me :(

    ReplyDelete
  3. I've always refused to buy anything without a numeric keypad... partly because of this exact problem!
    I hope we still will be able to use the keypad in future, and the other keys get freed up. I/O is a key feature of games and playability.
    One possible suggestion to the arrow key deficiency is a "shift" modifier - i.e. right shift adds a clockwise mod to an arrow press, left shift an anticlockwise. No idea how intuitive this would be?
    So RS+N=NE, RS+E=SE, RS+S=SW, etc.

    ReplyDelete
  4. Vi-keys are not that bad. :)

    I once constructed notebook keybinding configuration for ADOM that required pressing a modifier and two arrow keys one after another: "f up right" (and "f right up") walks NE, "f left down" walks SW, etc.

    I found it overly verbose, but some people on the Polish ADOM forum swear by it.

    ReplyDelete
  5. I am playing roguelikes and especially ADOM on notebooks for many years now and am now totally accustomed to using the number keys above the letters for the diagonal navigation.

    It may seem very counterintuitve at first, but one very soon gets used to it. The first three numbers are for "down" with both diagonal variations, then comes left-rest-right (convenient to have resting not too far from moving) and then come the 3 "up" movements.

    I usually use a hybrid of right-hand orthogonal navigation with occasional diagonal moves with the left hand. (That hand is involved in (w)alking anyway, so it is not too disturbing).

    But having the option to remap keys to commands would surely be most powerful. And would yield the possibility to provide "keymaps" to account for different keyboard layouts and adapt other roguelike's default control system.

    ReplyDelete
  6. In fact, if the player is allowed to configure keybindings, why not use ADOM's keybindings by default? People with a numeric keypad can use them, and people with laptops can reconfigure. Or maybe provide two default configurations, one for laptops and one for notebooks.

    Whatever you do, I think it doesn't make much sense to force people who DO have a numeric keypad to play with an awkward setup as if they didn't have one!

    BTW, my preferred setup for ADOM on my ThinkPad notebooks is just play with the default settings and use the "fake" keypad accessible with Fn+NumLock... OK, it's not fast, but one gets used to it and that way I don't have to learn two different keybindings (one for my desktop and one for my laptop).

    ReplyDelete
  7. Certain notebooks allows you tu use the "fake numpad" simply by *holding down* the FN key, without need to toggle the "numpad mode" on and off. I consider this as the best approach available. My own notebook has not such witty FN key, so I had to emulate such desired behaviour with Autohotkey, what is quite simple and allows me to play ADoM and most other (sadly, not all) roguelikes comfortably. In fact I got used to it so much that I use it sometimes even on PC keyboard :]. I can provide lame howto for those interested.

    ReplyDelete
  8. Well, at first, it's a major feature that Roguelike can be played on Notebook & Netbooks because I like to play those kind of game everywhere !
    Seconf thing, I have a Macbook air now, and I started a project on a Windows Netbook in java. And also my Macbook doesn't have a numerical keyboard so again, it's important to think your game "Numerical keyboard free !).
    Good luck for what will maybe become the Roguelike of the decade !

    ReplyDelete
  9. Oh, two other things:
    -Shift+Arrow could be an interesting thing to go diagonally.
    -Java Warning: I think you are aware of that, but just in case... On Java in OS X, I saw than the Esc key (27) is not detected in KeyTyped event (in windows systems yes), but in KeyPressed it works. Just in case....

    ReplyDelete
  10. 1-9 and/or mouse control; giving up letter keys is horrid.

    Or we could just have fully mappable controls?

    ReplyDelete
  11. I agree with the idea of shift modifying the movement keys, but I think control or alt would be a better modifier for the other direction rather than right/left shift differentiation. On the other hand, I have no idea how intuitive this would be at all; I personally have bought a small keypad extension for when I want to play roguelikes on my laptop.

    ReplyDelete
  12. I used to play ADOM with a laptop without numeric keypad. My system was to have bloq num on most of the time (that way I could move with "yuihjknm," or something like that). Whenever I needed to use some of these letters, I turned off bloq num, hit the letter and turned it on again.

    It may look clumsy, but you get used to it quickly.

    ReplyDelete
  13. I like BRouge's layout. hjkl for the cardinal directions and bnyu for the diagnols.

    BRogue simplifies things by making "a" be "apply" which can mean "eat" or "zap" or "quaff" depending on what it's applied to.

    ReplyDelete
  14. You could have an option for diagonal arrow keys movement: keys don't count when they're held down, on keyup check if another key is held and if it is, change direction accordingly. For example:

    LEFT (W) down,
    UP (N) down,
    LEFT (W) up: at this point move NW, flip a bit to nullify the next keys,
    UP up, nothing happens and since no keys are pressed, flip the previously-mentioned bit back.

    ReplyDelete
  15. I don't play any roguelike in any other way other than with vi keybindings. That option (configurability) should be provided (if it's provided in a easier than ADOM way, much better)...
    Other than that, the "y" for yes is not that bad, you could simply make it so that "Y" maps to yes, and the promt won't accept a "y".

    ReplyDelete
  16. I think keeping the controls of ADOM, but configurable (adding alternative profiles to choose in an option menu for added comfort), is definitely a good idea, considering that former ADOM players are going to form a big part of the early JADE audience.

    I don't like any of the letter solutions because there is no way to get the nice rectangular shape that makes using the numpad such a natural solution.

    One solution I just thought of is to have the diagonal directions mapped to Ctrl+arrow keys (not sure if even possible). Basically, the Ctrl key gives the arrow directions a 45° slant to one side, for instance turning left into southwest, up into northwest, right into northeast and down into southeast. I can only imagine that would be rather quick to get used to, and the "diagonal"-button would be relatively easy to find.



    I'm part of the "use number row" crowd back when my notebook didn't have a numpad. But at least for me, that adjustment to my muscle memory was little of an issue since I had long regressed into an ADOM fanatic. I think it would be most interesting to hear from people who got into ADOM from scratch playing it on a numpad-less keyboard. How much harder to enjoy is the game that way?

    ReplyDelete
  17. If the movements happen when you release the arrow key (for normal movements), then one possibility for diagonal movements is:
    hold down one arrow keys (e.g. up) and pressing left/right would cause the movement to the NW/NE, respectively.
    You can hold down any arrow keys and get other diagonal movements as well.
    I think, it should be the preferred choise for me.

    ReplyDelete
  18. Tank controls. One axis for left-right, another axis for up-down. Space bar for cardinal directions. You need to press two buttons at all times to move.

    ReplyDelete
  19. So I was playing Bulletstorm recently, and in that game spacebar = sprint (there is no jump). After that, whenever I switched to another FPS whenever I wanted to sprint I'd instead jump. In a similar fashion, if I play FPS where crouch isn't control I get confused, and head straight for the configure keys screen.

    Convention is important, especially for a roguelike where things are complicated enough already.

    So please, Vi controls and numpad should be supported, regardless of what you do here, roguelikes are complicated enough ;-)

    ReplyDelete
  20. Using ADOM keymapping by default makes sense to me. it's got be be customizable though. I use the dvorak keyboard layout, so I need the make the substitutions.

    ReplyDelete
  21. I can't really use anything other than the numpad for movement. The numpad is just too perfect!

    I did like the idea of combining some bindings together (in particular, what Ryan Szrama said). ADOM had a seriously huge list of bindings, and anything to reduce that will make the game more accessible, and reduce the memorisation needed!

    For example if drinking potions/pool and eating were both mapped to the same key. then when you press that key you have the option of 1-eating food or 2-quaffing potions.

    ReplyDelete
  22. I simply activate the [fn] and use the numpad as normal. Most of the things on 789uiojkl aren't that common, at least in ADOM, anyway; pressing fn+i for inventory isn't THAT big of a deal.

    Once you get used to it, I don't think there really is an issue at all, unless you're planning on adding a lot of new options. However, I think quite a few options from ADOM could go away; at least two of the four for dropping and picking up, at the very least.

    And perhaps a "body care" option that presents a menu for "wipe face", "clean ears" and the like.

    ReplyDelete
  23. For myself, I have a laptop with no number pad, and have always found that the easiest thing is using the numbers on the top of the keyboard (1-9, mapped to the equivalent on the num pad). I prefer it because it keeps the letters completely free, and I've actually found it easier to keep track of then trying to remember which letter is up or down or diagonal or whatever. At any rate, that's how I've played ADOM for years, and I've never had any problems.

    ReplyDelete
  24. just focus on full keyboard play, then make sure that the game options allow everything to be fully rebindable! that would solve all problems.

    ReplyDelete
  25. Mouse controls parallel to customizable keyboard controls; the best of both worlds. Make left click the singular movement/default collision action for that direction, double left click for the extended equivalent, right click for a list of available commands for a given cell.

    ReplyDelete
  26. I gather that customizable keyboards are a problem for a java applet, yeah? No user configuration files.

    So have the following three "options":
    1) Vim/Crawl/Hack style keymap
    2) Adom keymap 1 - Desktop
    3) Adom keymap 2 - Laptop

    And then it's quick to set whichever of those three you like.

    That said, if you're just worried about having a good default configuration for laptop keyboards, yeah, use the Vim style keybindings.

    ReplyDelete
  27. Just make it fully bindable. Anything less in this day and age is sub-par.

    ReplyDelete
  28. I think fully bind-able is the only way to go, on general principle.

    While I was reading the comments, i've been wondering: Why not try something radically different? Pretty much everybody is used to the way an FPS handles, with WSAD as the cardinal direction inputs. So why not apply this to roguelikes too? So you would have

    QWE for NW, N, NE
    ASD for W, Wait, E
    Y/ZXC for SW, S, SE

    Sure, that would mess with keyboard commands that use these letters (like s for skills), but I also think that ADOM, good as it is, had too many keystrokes for similar things. So condensing the list of commands (by contextualizing for example the equipment manipulation commands) could free up keyboard real estate. The ultimate goal should be to have as much functionality in as few keystrokes as possible.

    ReplyDelete
  29. dungeon crawl stone soup has great and easy keymapping. use h left, j down, k up, l right, y nw, u ne, b sw, n se.

    ReplyDelete
  30. Glad you're addressing this. I simplified my life, i.e. got rid of my external monitor and keyboard for my laptop, and haven't really played ADOM since because of this issue. Having a few options sounds great, but I don't think you have to go all the way to fully bindable.

    The two suggestions I like the most are:
    1) mouse control
    2) shift/ctrl + arrows for diagonal movement

    Keep up the great work!

    ReplyDelete
  31. On my laptop, I just got used to using the horizontal number row as movement ( 1 = SW, 2 = S, 3 = SE and so on). It took some time getting used to, but proved to be superior to numpad later on. Every letter was easily accessible that way.

    ReplyDelete
  32. I like vi key style... It may be surprising at first but in game were time is not issue it's ok

    It may be a stupid idea but you coud make modes:
    - In movement mode you get the the "notebook" movement scheme (and the commands that are not mapped to them)
    - In command mode you get the standard adom style commands with all the command active
    - You can switch anytime in game with a press of a button...
    - At all time numeric keypad is accessible for those who want it

    ReplyDelete
  33. Replacing laptop keyboards provides an easy solution to prevent the frustrating experiences with the non-functional keys that would let the user’s type perfectly. However, care must be taken to get the new keyboard from a reliable store that can assist in getting the most compatible parts for the different brands of laptops.

    ReplyDelete