Inputs Initiative
Purpose
The Inputs Initiative is a collaborative effort to ensure all Kudamono Editor interactions are:
- tailored to each genre (the best input modes and aux marks were picked) and frictionless, via comprehensive auto-modes that minimise switching
- intuitive via sensible defaults and consistent across genres (learn once, use everywhere)
- accessible (fully functional under restricted controls, such as touchscreen-only, keyboard-only, mouse-only)
- always correct, despite regular updates
Doing so requires cross-genre:
- automode configurations, through which the desired auto mode can be totally expressed
- input unit tests, to register the desired result for well-chosen interaction sequences
With these two pieces, all users are now empowered to:
- specify a preferred configuration unambiguously, for every genre;
- share configurations (and propose defaults);
- send a input unit test for inclusion in the system, so it starts (or continues) to work as expected;
- check system status independently for (un)known input bugs
Automode Configuration
Each genre can have at most two distinct auto configurations: one while solving and another while editing, following the structure:
automode:{
solve:{
...
},
edit:{
...
}
}
Each auto configuration is an object mapping gesture-locations to submodes, for instance:
solve:{
"CL-E":["monoline-e"]
"CR-E":["markbol-x"]
"CT-E":["monoline-e","markbol-x"]
}
Every genre is different, so only the specified gesture-locations produce effect.
Gesture-locations
A gesture-location joins a gesture with a location.
For example, CL-E
means left mouse click (CL) on edge (E), DR-D
drag with the right mouse button (DR) starting on the tile's diagonal quarter point (D).
The tile centre is the default location, so a centre tile tap is simply CT
.
Gestures
The following gestures are used in the automode configuration:
Gesture | Type | Meaning |
---|---|---|
CL | Click | Left mouse button |
CR | Click | Right mouse button |
CT | Click | Touchscreen (one finger-tap) |
DL | Drag | Left mouse button |
DR | Drag | Right mouse button |
DT | Drag | Touchscreen (one finger-drag) |
Further gestures are available for input unit testing.
Location
All locations are relative to the current tile.
Letter | Placement | EXAMPLE USE |
C | Centre | shading |
E | Edge midpoint | edge aux marks |
V | Vertex (corner) | edge line dragging |
A | Apothem midpoint (midpoint between center and edge midpoint) | directional line arrows |
D | Diagonal quarter point (midpoint between center and vertex) | diagonal line crosses |
K | Knight line quarter point | knight aux marks |
Currently, diagonals can be distinguished as DN, DE, DS DW for top left, top right, bottom right, bottom left. This is on of the few geometry dependent-aspects, to be improved. More cell locations may be added in the future if needed.
Submodes
Submodes are called in sequence based on the current cell content:
- for an empty cell, the first submode is called;
- for a non-empty cell, the "logical next" submode in the sequence will be called, based on cell content;
- if cell content matches the last submode (so no logical next) then said cell content is erased ("blank")
Each submode has a type and a specifier. Specifiers are used to designate a particular symbol, mark, etc…
Types
Type | Submode |
---|---|
penbol | drawing definitive lines (from segment endpoint) |
symbol | placing definitive symbols |
markbol | placing aux marks |
sketbol | drawing aux lines |
monoline | placing a definitive line (from segment midpoint) |
monosket | placing a sketch line (from segment midpoint) |
monopolarsymbol | placing a definitive number (no dial) |
polarsymbol | placing a definitive number, using the dial |
dialsymbol | placing a definitive symbol, using the dial |
polarmarkbol | placing a aux number, using the dial |
dialmarkbol | placing a aux mark, using the dial |
Type names are likely to be updated to become more uniform/memorable.
Specifiers
Most genres make use of a common system, thus they use common specifiers:
Specifier | Example with type(s) | Example meaning |
---|---|---|
z | symbol-z | shaded tile |
x | symbol-x | absent tile |
x | markbol-x | cross aux mark |
s | markbol-s | empty cell aux mark |
s | markbol-o | circular some-line aux mark |
e | penbol-e , monoline-e | edge line |
(none) | penbol- , monoline - | default tile-centered line |
(none) | sketbol- , monosket | default tile-centered sketch line |
integer | polarsymbol-integer | number |
alphabet | dialmarkbol-alphabet | alphabetical letter aux marks |
However, complex or special genres may use genre-specific specifiers, such as Akari RGB's automode.
Automode configuration examples
Shading genres
Shading genres such like Isowatari 磯渡り, Shrooms, Hasu no Mura はすのむら, Nurisquare, and others all use the following automode configuration:
automode:{
solve:{
"CL-C":["symbol-z"],
"CR-C":["markbol-s"],
"CT-C":["symbol-z","markbol-s"],
"DL-C":["symbol-z"],
"DR-C":["markbol-s"],
"DT-C":["symbol-z","markbol-s"],
}
},
In words:
- left click to shade
- right click to unshade
- tap to shade, unshade
- left drag to shade
- right drag click to unshade
- touch drag to shade, unshade
Yajilin-like genres
Yajilin ヤジリン-like genres such as R・B ループ Loop,White Link,Implicit Directors use the following automode configuration:
automode:{
solve:{
"CL-C" :["symbol-z"],
"CR-C" :["markbol-o"],
"CT-C" :["symbol-z","markbol-o"],
"CL-E" :["monoline-"],
"CR-E" :["markbol-x"],
"CT-E" :["monoline-","markbol-x"],
"DL-C" :["penbol-"],
"DR-C" :["sketbol-"],
"DT-C" :["penbol-"],
"DR-E" :["markbol-x"],
"DT-E" :["penbol-"],
}
},
In words:
- left click tile centre to shade
- right click tile centre to place circular aux mark
- when tapping tile centre, start by shading, then placing circular aux mark
- left click edge midpoint to place line segment
- right click edge midpoint to place cross mark
- tap edge midpoint place line segment, then again cross mark
- left mouse drag, starting on tile centre, to draw definitive line
- right mouse drag, starting on tile centre, to draw sketch line
- touch drag starting on tile edge, to draw definitive line
- right mouse drag starting on tile edge, to add cross aux marks
Akari RGB (special automode)
This automode is used in Akari (RGB), and uses specifiers not relevant to any other genre.
automode:{
solve:{
"CL-C":["symbol-r","symbol-g","symbol-b"],
"CR-C":["markbol-x"],
"CT-C":["markbol-x","symbol-r","symbol-g","symbol-b"],
"CR-DE":["markbol-r"],
"CR-DW":["markbol-g"],
"CR-DS":["markbol-b"],
"CT-DE":["markbol-r"],
"CT-DW":["markbol-g"],
"CT-DS":["markbol-b"],
"DL-C":["markbol-x"],
"DR-C":["markbol-x"],
"DT-C":["markbol-x"],
}
},
In words:
- left click tile centre to sequentially place red, green, blue light bulbs
- right click tile centre to place cross mark
- tap tile centre to sequentially cross mark, red, green, blue light bulbs
- right click diagonal quarter point (top right) to place R mark
- right click diagonal quarter point (bottom left) to place G mark
- right click diagonal quarter point (bottom right) to place B mark
- likewise for taps on diagonal quarter points
- left mouse drag, right mouse drag, touch drag to place cross aux marks
Input Unit tests
Each input unit test has tree fields: from, to and via, placed like in this example:
from:"W=1x1",
to:"W=1x1&LF=z0",
via:[{CL:[[0,0]]}]
Each field is explained now:
From
The initial state is represented in the from
field.
It is the current board before any interaction takes place, expressed as a reduced puzzle url (just the part after the question mark) between quotes.
The simplest possible from
field represents an empty, a single-cell 1x1 board:
from:”W=1x1”
.
To
The final state is represented in the to
field.
It is the current board after all interactions took place, expressed as a reduced puzzle url.
Let's say we wish to place, on that same 1x1 board, a shaded cell. Thus we obtain:
to:”W=1x1&LF=z0”
.
Via
The via field stores the sequence of interactions that transform the initial into the final state.
In our example, we wish to perform a sequence of a single left-click (CL) action to place a shaded cell on the leftmost, bottom cell (coordinates 0,0).
via:[{CL:[[0,0]]}]
.
Gestures in input tests
In addition to those gestures supported in automodes, the following are available for input testing:
Via | Type | Button |
---|---|---|
CM | Click | Middle mouse button |
DM | Drag | Middle mouse button |
K | Key | Keyboard key sequence, e.g. ”A” , ”1” , ”spacebar” , ”ctrl shift del” (always between quotes). |
WU | Wheel | scroll wheel up |
WD | Wheel | scroll wheel down |
More gestures may be added in the future, as needed.
Coordinates for click/drag gestures
In the square grid, standard cartesian coordinates are used, with origin at the centre of the bottom left cell.
Zooming in on the origin cell, we can see that with fractional coordinates can be used to specify any point, such as tile vertices and tile edge midpoints.
Specify an automode configuration
Please use this table to find previous configurations, closer to the desired behaviour. For each genre, there are columns for the configuration while solving and while editing, if already specified. In certain cases, a combined configuration includes both. Clicking a configuration name will open the source. Sorting by column or searching by configuration name are two quick ways to see how many genres share the same configuration.