chiark / gitweb /
special selection: show hint for SPC
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 3 Apr 2021 20:49:53 +0000 (21:49 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 4 Apr 2021 19:07:53 +0000 (20:07 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts

index 191939404ad3bc8cb7f4215b0fbb6cd9215c4497..c5804de14e3f302c34f2f9b5485ed1be24d5e390 100644 (file)
@@ -341,6 +341,15 @@ function recompute_keybindings() {
     desc: wresting ? 'Exit wresting mode' : 'Enter wresting mode',
     wrc: 'Predictable',
   });
+  if (special_count != null) {
+    add_uo(null, {
+      def_key: 'SPC', // won't match key event; we handle this ad-hoc
+      kind: 'ClientExtra',
+      opname: 'cancel-special',
+      desc: 'cancel special count',
+      wrc: 'Predictable',
+    });
+  }
   add_uo(null, {
     def_key: 'h',
     kind: 'ClientExtra',
@@ -474,6 +483,7 @@ function special_count_reupdate() {
 }`;
   }
   style_elem.innerHTML = style_text;
+  recompute_keybindings();
 }
 
 keyops_local['left' ] = function (uo: UoRecord) { rotate_targets(uo, +1); }