From af1d5ddbc79c7b71349670e267cb01f911d3dada Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Sat, 23 Apr 2022 21:23:05 -0600 Subject: [PATCH] Final (I hope) Iambic B tweak --- static/keyer.mjs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/static/keyer.mjs b/static/keyer.mjs index 9981ae2..fd9b811 100644 --- a/static/keyer.mjs +++ b/static/keyer.mjs @@ -333,8 +333,12 @@ class Keyer { */ Dit(down) { this.ditDown = down - if (down && this.typeahead || !this.Busy()) { - this.Enqueue(DIT, this.typeahead) + if (down) { + if (this.typeahead + || !this.Busy() + || (this.iambicModeB && (this.last == DAH))) { + this.Enqueue(DIT) + } } } @@ -345,8 +349,12 @@ class Keyer { */ Dah(down) { this.dahDown = down - if (down && this.typeahead || !this.Busy()) { - this.Enqueue(DAH, this.typeahead) + if (down) { + if (this.typeahead + || !this.Busy() + || (this.iambicModeB && (this.last == DIT))) { + this.Enqueue(DAH) + } } } }