From The Mana World
Revision as of 14:13, 20 September 2005 by Bjørn (talk | contribs) (Added keyboard usage proposal)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Purpose

The purpose of this document is to propose a generally new way of handling keyboard input, that streamlines several features we want to introduce in this area like consistent shortcuts, user-definable keys and a nice cooperation with the GUI. The primary problem it tries to solve currently is the conflict between GUI and chatting about the usage of the Enter key.

The current keys as from the README file:

- Left Ctrl          attack
- Alt + 0-9          show emotions
- F1                 show the online help
- F5                 sit down / stand up
- F6                 toggle debug pathfinding feature
- G or Z             pick up item
- Enter              focus chat window / send message
- Alt + K            show skills
- Alt + S            show stats
- Alt + I            show inventory
- Alt + E            show equipment
- Alt + C            show setup window
- Left Shift         hold it when attacking to lock target for auto attack

Chatting

At the moment you press Enter to start a chat message. This makes the chat box appear so that you can type your message, until you press Enter again to send it. While typing your message, you can move your cursor with Left and Right, and navigate your chat history with Up and Down.

Problems:

  • Enter is also used for confirming a pop-up dialog.
  • People forget about pressing Enter (for example ElvenProgrammer)
  • It is not possible to walk while having a message in progress.

Instead of Enter, we could use any valid chat character to immediately start the chat message. Also, we could move cursor and history navigation to be only possible when using the arrow keys in combination with Alt, while without control would still move your character as normal. Now Enter can be used without problems for confirming a dialog, while you could still start typing a chat message while a dialog is active.

Dialogs

I'd propose to move the toggling of dialogs to the function keys.

World interaction

We're using Ctrl for attacking and this seems fine to me. I'd propose to start using this key also for friendly interaction with the world, like initiating a trade with an NPC, picking up an item or opening a door.

World interaction also requires selection of a target. While you can rely on walking up to and facing the thing you want to interact with, this is not always convenient. An NPC could be surrounded, a monster could be approaching diagonally, or the interaction could be meant to be used from a distance. I'm thinking about using either Tab/Shift+Tab to iterate through possible targets, or Shift+Direction. I'm leaning towards the latter now because Tab would already be used for navigating GUI widgets, but then I think that's a bigger problem that needs to be solved differently (see problems still remaining, below).

If there are multiple actions that can apply to a certain object this should be made clear in some way. I think we could use Shift + Ctrl or Alt + Ctrl to make a menu appear with all options.

Special commands

There's a few special commands already in use now and any number could be added in the future. These special commands include using emotions and sitting down / standing up. In this area we could also allow the user to set up a custom key binding for a special command, possible through the use of IRC-like chat messages bound to keys. I think we should use Alt consistently as the modifier key for these commands.

Problems still remaining

It will still be impossible to control the general GUI like your inventory or the trade dialog with your keyboard. In the longer term the plan is to solve this issue, and I think we'll have to do this by turning off control over your character while these dialogs are active. This would make the arrow keys and action key available for GUI control.

Table of keys

Function Key(s)
Walk around Left, Right, Up, Down
Select target Tab / Shift + Tab or Shift + Direction
Default action (attack, pickup, trade, talk) Ctrl
Show menu with all actions Alt + Ctrl
Start chatting / continue writing chat message a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, ø, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, Ø, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, !, @, #, $, %, ^, &, *, (, ), -, _, =, +, {, }, [, ], ;, :, ', ", <, >, /, ?, ~, `, \, |
Move cursor in text input field Alt + Left, Alt + Right
Navigate history of chat messages Alt + Up, Alt + Down
Confirm dialog Enter
Toggle help window F1
Toggle profile window F2
Toggle inventory window F3
Toggle equipment window F4
Toggle skill window F5
Toggle map window F6
Toggle chat window F7
Toggle debug window F8
Toggle setup window F9
Sit down / stand up Alt + S, /sit
Use emotion Alt + 0-9, /emot 0-9