fromheten / blacken

Automatically exported from code.google.com/p/blacken
0 stars 0 forks source link

Logical key commands and standardized alternate keyboard mappings #32

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Please describe use-case:

We want to support functional internationalization of Blacken applications.

Roguelike games frequently use a large collection of key-based commands. One 
command == one key.

Additionally, not all keyboards are the same. What are functional keys for one 
keyboard may be unusable on the other. The traditional "roguelike" movement 
keys only make sense on a QWERTY keyboard, though that doesn't mean that having 
movement restricted to the number pad (or cardinal directions) is the best 
choice for the user. (On a laptop neither may be available.)

We have a number of issues:

1. Everyone has their favorite large Roguelike with their preferred keyboard 
mapping. (Nethack, Angband, TOME, ADOM, Larn, Omega, etc.)

2. International users may want to opt for the "feel" of a Roguelike keybinding 
with a US keyboard, even when the actual keys are different.

3. International users may already have an established keybinding for an 
internationalized version of a game.

4. The user may have always exclusively played with a hand-designed keybinding. 
If someone has been playing with hand created keybindings -- while we cannot 
directly support another application's keybinding, we can very easily reduce 
the number of times a Blacken keymap needs to be defined down to one.

The idea is that you would getch(), then pass the codepoint through some sort 
of KeyCommandService that would take that codepoint and convert it to a CMD_* 
codepoint.

I've already given some thought to this. The goal is to both reduce the amount 
of work for developing keymaps as well as the amount of work to implement them. 
Standardization helps.

I'm not even saying that the documentation for a function needs to be 
consistent for a key across all games. Not all functions map cleanly. It's 
possible to overcome this, though. 

The benefits of this are too great to ignore. 

So, game Foobar ships with a custom keymap because the developers think they 
have the best idea for how things should be mapped. Are they going to ship just 
one keymap -- the one for plain-jane QWERTY US? Probably. Should that shut out 
the international market? No it shouldn't. 

Plus, if that keymapping is so great, why should it be restricted to that one 
game? We get cross-game sharable keymaps if we get this right.

I think it's possible to get this right.

Original issue reported on code.google.com by yam...@gmail.com on 10 Aug 2012 at 11:29