If you're not tired of all my updates, here's another one!
I've totally changed the way I decode the keypresses, so that each individual key in sequence is sent if two or more keys are not pressed simultaneously.
The Current single/double key map is (Capitol - Single, Lower - double from two adjacent characters):
Code: Select all
* A f O y I q <
^ T h E m N g S
# D b R v L #
# U ' C , . #
Therefore, A followed by A>O will result in AO being typed. Pressing A+O simultaneously will generate F. (A>O indicates A pressed then while holding A pressing O).
I've expanded on this to change key pairs based on the start and end keys. T followed by T>E does not generate the TE pair, but the more common TH. Thus 'The' is simple the rolling T>E followed by an E which is quite easy to type.
I then expanded this to three character pairs, so T>E>N will add type TH followed by EN to generate THEN... Pressing T, E, N will result in the slower TEN which is less frequent word.
I, N>S will change the S to a G to create ING rather than needing to type I, N, N+S. This makes typing much faster.
I've made a switch statement for the translation to allow any combination to be created. At present, a single press, based on the last character can generate up to three characters (each with different modifiers if needed).
Code: Select all
switch (Step) {
case 2: // Additions / Substitutions on second character
switch ((char)Send[1]) {
case (char)KEY_E: if (SendOld == (char)KEY_T) Send[1] = KEY_H; break; // TE -> TH
case (char)KEY_A: if (SendOld == (char)KEY_O) Send[1] = KEY_F; break; // OD -> OF
case (char)KEY_S: if (SendOld == (char)KEY_N) Send[1] = KEY_G; break; // (I)NS -> (I)NG
}
break;
case 3: // Additions / Substitutions on third character
switch ((char)Send[1]) {
case (char)KEY_N: if (SendOld == (char)KEY_H) Send[1] = KEY_E; Send[2] = KEY_N; break; // (T)HN -> (T)HEN
}
break;
}
At present it adds/substitutes on the second/third character, but you could use backspace to erase the first character followed by two new characters if needed.
I'm really enjoying messing around with this 'keyboard', and if I ever stop moving the letters around I feel I could become quite quick typing on it.
PJE