kbmulti - Fix space and backspace when not at end of text
parent
2b3b451ec7
commit
54232adbe8
|
|
@ -73,9 +73,11 @@ exports.input = function(options) {
|
||||||
|
|
||||||
function backspace() {
|
function backspace() {
|
||||||
deactivateTimeout(charTimeout);
|
deactivateTimeout(charTimeout);
|
||||||
text = text.slice(0, -1);
|
if (textIndex > -1){
|
||||||
if (textIndex > -1) textIndex --;
|
text = text.slice(0, textIndex) + text.slice(textIndex + 1);
|
||||||
newCharacter();
|
if (textIndex > -1) textIndex --;
|
||||||
|
newCharacter();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setCaps() {
|
function setCaps() {
|
||||||
|
|
@ -126,7 +128,7 @@ exports.input = function(options) {
|
||||||
displayText(false);
|
displayText(false);
|
||||||
} else if (dirLeftRight == 1) {
|
} else if (dirLeftRight == 1) {
|
||||||
if (!moveMode){
|
if (!moveMode){
|
||||||
text += ' ';
|
text = text.slice(0, textIndex + 1) + " " + text.slice(++textIndex);
|
||||||
newCharacter();
|
newCharacter();
|
||||||
} else {
|
} else {
|
||||||
if (textIndex < text.length) textIndex++;
|
if (textIndex < text.length) textIndex++;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue