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

Can people who use non-qwerty keyboard tell me if they have any convenient tricks for playing those html games that almost never let you rebind keys? Having to switch mapping is so inconvenient...

If web gaming becomes a thing I think people should start thinking about a standard way to let people rebind their keys, through the browser or some common library.

I'm French. I can tell programming is downright painful in Azerty, so I end up buying Qwerty computers and use the "switch to International US" shortcut whenever I need to write French. On that one, quotes and double quotes become accents and tails on letters. You can even put an accent on "l".

I'm German. Same thing, I buy US layout keyboards (often paying a premium for import, boo). I long ago retrained myself to the US layout because for programming and system administration localized layouts are hell (the / is on Shift-7 and the parens are offset by one, useful stuff like semicolons has been pushed outwards by useless Umlauts).

On the rare occasion I still write in German, I use OS X' fantastic compose key feature: ⌥u makes two dots and any following key is then converted to an Umlaut, so ⌥u + u = ü, ⌥u + A = Ä.

If you're playing on a windows machine, Autohotkey is probably the easiest solution. You can do key remapping based on the window that's open with #IfWinActive / #IfWinExist.

Writing the scripts is ugly, but effective and not too tough

I have to second AHK. Cube World was unplayable for me until I discovered it.

I've yet to find a reasonably good Linux clone of AHK, but then, most Linux games I've encountered tend to be quite configurable. Starbound comes to mind as problematic, but I haven't touched it in a few months.

Try using xbindkeys and xdotool together. xbindkeys uses guile as an extension language, with guile functions bound to keyboard shortcuts to invoke xdotool to simulate inputs. It works well enough that I get annoyed every time I have to deal with AHK's weird scripting language.

Thanks a bunch for the suggestion! I'll look into this next time I try Starbound, if they haven't fixed (added?) key bindings.

just change you keyboard mapping to qwerty on your computer. you can do this natively on mavericks with the cmd + space shortcut

It's still annoying to need to change the entire input method, and then remember that it's different for that window (or globally, depending on particulars of your system).

In any case, QWERTY is not the default worldwide. The letters 'a', 'w', 'e', 'd', 'z', and 'x' have no special semantic significance for this game, they're chosen for their relative positions in a particular keyboard layout.

The actual game actions of 'shift upper left', 'shift upper right', and so on, should be able to be associated with any particular input - including other keys, or relevant swipe gestures on mobile.

I agree with OP - there should be a standardized way of doing this, so that game authors don't have to re-invent keybindings for every new game. (or, as they're wont to do, fail to re-invent keybindings)

> It's still annoying to need to change the entire input method

But you are effectively changing the input method from "typing" to "gaming", so it makes sense to have to toggle some switch somewhere.

Butbutbut... this is what SCANCODES are for... Why aren't people using that for games nowadays? Is it out of fashion already?

I agree entirely. I attribute the lack of scancode usage in keybindings to the laziness and depravity of the young generation ;)

Actually, Javascript is a little weird with regard to scancodes. Try playing with http://javascript.info/tutorial/keyboard-events in different keyboard layouts - you'll notice that there's no code that's consistent across different layouts.

cmd + space defaults to Spotlight.

It changes if you have multiple keyboard layouts installed, confusingly enough.

I think you have to explicitly enable that. Or it isn't enabled for me, perhaps because I installed Mavericks as an update rather than a full installation? I didn't even notice it was an option until I was adding a 3rd layout the other day.

The combo is customizable though, I've got it set to Cmd+Opt+Space for example.

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