QWERTYcube - Keyboard oriented Rubik's Cube

by Steven Elliott based on rubik_scrambler by Siddhante Nangla

Overview

As the name suggests QWERTYcube was originally intended to be a keyboard based cube. However, it has evolved to have mouse support as well as touch support on mobile devices. If you just want to see a reference describing the buttons and keys scroll down.

Keyboard

The keyboard can be used to either make moves in the expected way (R, L, U, D, etc.) or for various commands (T, L, etc.). Some commands that destroy information, such as N and P, require that Alt and Shift be pressed at the same time. For moves Alt and Shift make the move double layer and inverse respectively. Also for moves a numeric prefix may be typed immediately before a move. For example, pressing 2 then Shift-R results in move 2R' (move the second layer from R in the R' direction). Prefixes may have ranges. For example 2-5L would move layers 2 through 5 from L in the L direction. All three middle moves (E, M, S) and entire cube rotations (X, Y and Z) are supported. The keys can be reconfigured (see "Settings"). Note that some of the command keys have numeric alternatives. This is helpful when the Heise key mapping is active. Finally, some commands may still be accessible via shift. For example, when Heise is enabled Shift-J will scramble the cube.

Mouse And Touch

Mouse and touch support should be intuitive, but there are some things about it that may not be obvious. Clicking on the grey background rotates the entire cube. Note that when the cube is rotated this way the R, L, U, D, etc. labels follow the cube (see "Orientation labels"). If the cube is accidentally rotated slightly this way pressing % can snap it back to its proper orientation. If rotation lock (see "Rotation lock") is on the program does it's best to interpret movement on the grey background near the cube as being a cube move.

Clicking the mouse on the cube and moving results in a cube move. Although it should be obvious how this works in the case of moving a single layer it's also possible to move multiple layers, such as a double layer move (r, etc.) or even the entire cube (X, etc.). To move multiple layers the swipe should cross a layer boundary. All touched layers will rotate.

Clicking the mouse on the cube and not moving (a single click) will also produce a cube movement. In all cases the move direction is toward the side closest to the click. For edge stickers a single move is possible. For corners, two moves are possible. For middle stickers any of the four directions are possible for an entire cube rotation.

Multi-touch is supported for mobile devices in order to make multiple moves simultaneously as long as the moves are compatible. See Move Consolidation.

Moving by mouse can be combined with the Shift and or Alt key. Shift reverses the direction of the move and Alt extends the number of layers moved. See the modifier key table.

Move Consolidation

Multiple moves may be consolidated into a single move as long as they are compatible. Moves are considered to be compatible if they go the same direction and amount around the same axis. For example, L and M can be consolidated to form l. The consolidation is done if the moves are made close to the same time, either by pressing keys or multi-touch. This allows key mappings, such as Heise, to be used that depend on being able to make simultaneous compatible moves.

Savepoints

If the cube is in a state that you want to get back to later then click Save or the C key. You might do this if you've reached the OLL or PLL stage and you're not sure if you can do the algorithm correctly, so you want to be able to go back and try again if you make a mistake. Normally Undo or G key undoes a single move, but that behavior can be modified by the Alt (instead of a single move undo until the next savepoint) or Shift (redo instead of undo). See the modifier key table.

Scrambling

By default when Scramble or J is pressed a scrambler named "jsss" is used to scramble the cube. For 2x2x2 and 3x3x3 cubes it's a random state scrambler which works by randomly selecting a cube from all possible cubes, and then inverting the solution, which should be as good as scrambling the cube with an infinite number of random moves. For 4x4x4 and higher order cubes the cube is scrambled with randomly generated moves. Alternatively the "simple" scrambler can be used which is faster, but not as good. Push Config or I and look for scrambleMoves to see the moves used to scramble the cube. Look for scrambleType to see or change scrambler type. A savepoint is created after each scramble, which means pressing Undos or Alt-G will undo the scramble and Redos or Alt-Shift-G will then redo the scramble. By default the scramble moves are applied to the existing cube. If instead you wish to start with a new cube, and then apply the scramble moves to that new cube, press Alt-Shift-J instead of J. For non-keyboard users press New and then Scramble.

Timer

A timer an be toggled by pressing Timer or T. Scrambling the cube starts a 15 second count down at which time the timer is red. This is the inspection period. During the inspection period you may rotate the entire cube via clicking on the grey background, mouse gestures or axis keys. If you make an actual move during the inspection period the inspection period will end and the timer will turn green and start counting up. Once the cube is solved the timer will stop and will turn yellow to show the solve time. The timer also turns green and starts counting up upon New or N just in case you want to time something that way. The timer is off by default due to potentially high CPU usage.

Settings

Pressing the Config or I displays the settings dialog. This is where various obscure and advanced settings are stored. Things like the background color, cube color, cube size, animation, initial cube facelets, etc. can be configured in the settings dialog. Read the text at the start of the settings dialog for an overview of how settings work. Click Ok to store the settings to persistent storage. Note that the settings dialog can be used in this way to save settings that were not set in the settings dialog. For example, let's say you've engaged rotation lock by pressing Lock or K and you've rotated the cube slightly change the perspective and you want it this way the next time QWERTYcube is loaded. To save that and all other settings to persistent storage click Config or I and then click Ok. Note that persistent storage can be cleared by pressing Reset or P.

Query Parameters

It's possible to override the built in defaults for the variables that can be seen in the settings dialog by appending HTTP query parameters to the URL. For example, when the page is first loaded to set the cubiesOrder to 4 and to set cubiesColorOverrides to "R:grey L:magenta I:0x224466" append "?cubiesOrder=4&cubiesColorOverrides=R%3Agrey%20L%3Amagenta%20I%3A0x224466" to the URL. Note the percent encoding. The user can override the values via the settings dialog.

Key Tables

Control Key Button Description
@ n·n·n Decrease the cube order
# 3·3·3 Set the cube order to 3
$ N·N·N Increase the cube order
% Snap to the closest corner, edge or side
A or AS0 Inst Toggle instantaneous animation
C or AS1 Save Set a savepoint. Try with Alt-G.
G or ' Undo Undo last move. Shift to redo
H or AS2 Help Display this help message
I or AS3 Config Display the configuration/settings
J or [ Jumble Scramble the cube. By default jsss is used.
K or AS4 Lock Rotation lock. Prevent cube rotations.
N or ] New New solved cube
O or AS5 Toggle orientation labels
P or = Reset Persistent storage clear (factory reset)
Q or AS6 Color Switch to the next color scheme
T or AS7 Timer Toggle the timer
V or AS8 Heise Toggle Heise key mapping

Face Key Description
R Rotate the right face clockwise
L Rotate the left face clockwise
U Rotate the upper face clockwise
D Rotate the down face clockwise
F Rotate the front face clockwise
B Rotate the back face clockwise

Center Key Description
M Middle turn around the X-axis
E Equator turn around the Y-axis
S Slice turn around the Z-axis

Axis Key Description
X Rotate entire cube about the X-axis
Y Rotate entire cube about the Y-axis
Z Rotate entire cube about the Z-axis

Modifier Key Description
Shift "S" in some places. For moves anti-clockwise instead of clockwise. For G do redo instead of undo. May be combined with Alt. For mouse triggered moves Shift reverses the direction of the move. It changes the mouse click to a pull instead of a push.
Alt "A" in some places. For moves two layers instead of one. For G go to the next or previous savepoint instead of making a single move. For mouse triggered moves this extends the mumber of layers moved in order to assist with moving multiple layers and whole cube rotations.
Esc Alternative to Alt. Use this when a key combination, such as Alt-F, is interpreted by the browser. Try pressing Esc then F (not at the same time) for that example.