Optimizing key layout

Thread in 'Discussion' started by caffeine, 8 Nov 2006.

1. caffeine

I've swapped around key layouts for Tetris many times. It's really annoying, but I can't help but think maybe there's a faster way. So I've decided to once again change up my layout, and this time I want to do it right.

Firstly, I gathered some data. I opened up notepad and tested three times how many keys I could hit with each finger within fifteen seconds.

The averages:

Code:
110.3 Right Index
102.0 Right Middle
096.3 Right Pinky
094.6 Right Ring
091.0 Right Thumb
086.6 Left Index
082.3 Left Middle
078.3 Left Pinky
077.3 Left Ring
071.6 Left Thumb

Next, I played a game of forty line and recorded each time I hit a button. I tried my best to play without doing anything unnecessary yet still naturally (so even though I could get away with not holding, I still did it when I normally would).
Code:
104 Hard
063 Move Right
059 Move Left
039 Rotate Right
036 Rotate Left
005 Hold
000 Soft

Note that this is for a seven key layout. I'll need another map for an optimized ten key layout (including double rotate and far left/right). I'm sticking to seven key for now because that's what authentic games use. Also note that this is for SRS with fast DAS. Slow DAS should resemble fast, though. Moreover, this is in 0G. 20G will differ slightly. No ARE!

Okay, so next I looked at the design principles behind the dvorak keyboard, which was made for speed, accuracy, and efficiency in typing.
Code:
1. It is easier to type letters alternating between hands.

2. For maximum speed and efficiency, the most common letters and digraphs should be the easiest to type. This means that they should be on the home row, which is where the fingers rest, and under the strongest fingers.

3. Likewise, the least common letters should be on the bottom row, which is the hardest row to reach.

4. The right hand should do more of the typing, because most people are right-handed.

5. It is more difficult to type digraphs with adjacent fingers than non-adjacent fingers.

6. Stroking should generally move from the edges of the board to the middle. An observation of this principle is that when tapping fingers on a table, it is easier going from little finger to index than vice versa. This motion on a keyboard is called inboard stroke flow.

1. I should use both hands to alternate keys I would press about simultaneously.
Code:
Functions that can occur simultaneously:
Move Right and Rotate Right
Move Right and Rotate Left
Move Left and Rotate Right
Move Left and Rotate Left
Soft and Any of the above combined or independent

Functions that can't:
Hard and Anything
Hold and Anything

It looks like I should use one hand for movement and another for rotating.

5. (Going out of order on purpose.) Keys that occur one after the other should be separated.
Code:
Functions that occur closely together (these mostly are the fast DAS "go to the wall then backtrack moves):
Left then right
Right then left
Left then rotate right
Right then rotate left
Hard then move/rotate/hold
Hold then move/rotate/hard

So separate left and right. Rotations/movements are already separated by hands. Separate hold/hard from move and rotate.

6. Not sure how this one can apply. Well, I guess it would mean place the last step (hard drop) at the middle.

2, 3, and 4. Right hand handles most of the typing. Most frequent functions assigned to fastest fingers. Also, I think direction should correspond (move left / rotate left on left and vice versa): don't want to drive myself crazy. To add to this point, the differences between where these would count are very small, and my test run could've been erroneous anyway.

Okay, so with all of these influences, I think it comes out to this:
Code:
Hard
Right Index (J)

Move Left
Right Middle (K)

Move Right
Right Pinky (;)

Rotate Left
Left Middle (D)

Rotate Right
Left Index (F)

Hold
Left Pinky (A)

Soft
Right Thumb (SPACE)

What do you guys think? Did I miss anything? Note I separated hold, but not hard. According to principle six, hard shouldn't interfere too much since it's in the middle anyway, but hold would interfere with move left if it was on right ring. The frequencies/fastest fingers also support this decision. Now to start practicing it on no falling piece/shadow baboo...

2. colour_thief

I think you're looking too much into this. My zero-thought arrow keys + ASD setup is almost as useful, with a slight disadvantage when using Up and Down. A disadvantage that disappears with a joystick.

That Neave Tetris game that was going around at my work has exceptionally shitty controls. Left, Right, Up (clockwise), Down (soft drop). Furthermore, it was unable to detect simultaneous button presses. Co-workers expected to be impressed so I had to play this shitty game... I eventually adapted, flicking left or right + up to move while rotating pieces more efficiently. It felt kind of like zangi-moves, using one hand motion instead of several finger motions. It was sort of hard to stop rotating but continue moving though... which led to misdrops.

Just food for thought.

3. caffeine

too much thought?

i know, i'm crazy. and i bet an expert player can reach 2.5tps with nearly any input configuration. but the world's fastest typist did use a dvorak...

4. colour_thief

I'd believe that. But the main thing needed to achieve that dvorak efficiency is seperating rotation and movement to different hands... I don't see your setup doing anything else along those lines.

One elegant control mechanic that has been underused since Game&Watch:

redundancy

If you had 2 Lefts and 2 Rights, you'd be able to alternate hands when tap tap tap-ing. You know, those annoying 2-3 space movements that can't be aided with a fast DAS. This is the sort of thing that will help you, and IMO it's a good compromise between simplicity and a crazy-ass macro scheme that uses every keyboard button.

5. caffeine

with SRS fast DAS, you never tap movement more than twice. adding left/right to both sides will consume attention from other functions, which i think will hurt more than help.

6. colour_thief

I'm just throwing ideas out there. Maybe you'll like this one more?

Combine Soft and Hard. Depress the button for a soft drop, release to hard lock. Works best with an instant drop. Great for getting that extra wallkick in after grounding the piece.

I'm actually really liking that idea. Plus it only really works with keyboards, not the typical joystick or control pad setup.

7. caffeine

yeah, that is a cool idea. it's like a simplified firm drop.

8. colour_thief

Holy crap, this would make zangi-moves 100% natural on a keyboard.

This is sure to give me a great advantage in the CTRS vs JAGORS arms race.

And holy crap when I apply this concept more widely it totally changes the direction I'm going in with CTRS for the better.

9. caffeine

if only the ipod guys what've though of that. could've fit hold in there.

10. tepplesLockjaw developer

You just reinvented what I had been calling "spring loaded lock" based on early discussions between myself and caffeine. But in fact, that could work in a game's options menu.

Allow diagonal presses: Off | On

Soft drop: Slide | Lock | Lock on release

Hard drop: Slide | Lock | Lock on release

11. caffeine

i knew something sounded familiar...

12. cdsboyUnregistered

i think that is a really interesting idea. i would defidently throw it into the next version of lockjaw.