From: Ian Jackson Date: Sat, 3 Apr 2021 20:49:53 +0000 (+0100) Subject: special selection: show hint for SPC X-Git-Tag: otter-0.5.0~223 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=72a4ffe2cf6ea29f069656495d14e9fe52058597;p=otter.git special selection: show hint for SPC Signed-off-by: Ian Jackson --- diff --git a/templates/script.ts b/templates/script.ts index 19193940..c5804de1 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -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); }