--- a/svghmi/widget_keypad.ysl2 Sat Apr 04 09:41:32 2020 +0200
+++ b/svghmi/widget_keypad.ysl2 Sat Apr 04 17:47:16 2020 +0200
@@ -15,8 +15,8 @@
| },
| on_key_click: function(symbols) {
| var syms = symbols.split(" ");
- | this.shift = this.caps;
- | this.editstr += syms[this.shift?syms.length:0];
+ | this.shift |= this.caps;
+ | this.editstr += syms[this.shift?syms.length-1:0];
| this.shift = false;
| this.update();
| console.log(symbols);
@@ -45,16 +45,20 @@
| },
| on_Space_click: function() {
| this.editstr += " ";
+ | this.update();
| console.log("Space");
| },
| caps: false,
| on_CapsLock_click: function() {
| this.caps = !this.caps;
+ | this.update();
| console.log("CapsLock");
| },
| shift: false,
| on_Shift_click: function() {
| this.shift = true;
+ | this.caps = false;
+ | this.update();
| console.log("Shift");
| },
const "g", "$geometry[@Id = $hmi_element/@id]";