Add keys for vband compatibility

This commit is contained in:
Neale Pickett 2021-01-18 14:32:48 -07:00
parent fc213369c1
commit ad596546bb
1 changed files with 71 additions and 63 deletions

View File

@ -555,11 +555,19 @@ class Vail {
let begin = event.type.endsWith("down") let begin = event.type.endsWith("down")
if ((event.code == "KeyX") || (event.code == "Period")) { if ((event.code == "KeyX") ||
(event.code == "Period") ||
(event.code == "ControlLeft") ||
(event.code == "BracketLeft") ||
(event.key == "[")) {
event.preventDefault() event.preventDefault()
this.iambicDit(begin) this.iambicDit(begin)
} }
if ((event.code == "KeyZ") || (event.code == "Slash")) { if ((event.code == "KeyZ") ||
(event.code == "Slash") ||
(event.code == "ControlRight") ||
(event.code == "BracketRight") ||
(event.key == "]")) {
event.preventDefault() event.preventDefault()
this.iambicDah(begin) this.iambicDah(begin)
} }