diff --git a/static/1992.html b/static/1992.html
new file mode 100644
index 0000000..830ac23
--- /dev/null
+++ b/static/1992.html
@@ -0,0 +1,157 @@
+
+
+
+ Vail
+
+
+
+
+
+
+
+
+
+
+
+
+ Vail
+ A Morse Code Chat Server
+
+
+ Hi! You've reached Vail, a morse code chat server on the internet!
+ To get started, just click on the "key" button, and you'll be transmitting to whoever out there is listening!
+
+
+
+
+
+
+ Key
+
+ (shortcuts:
+ .
+ x
+ )
+
+
+
+ Key
+
+ (shortcuts:
+ /
+ z
+ )
+
+
+
+
+
+ Your current repeater is
+
+
+ General
+ Channel 1
+ Channel 2
+ Channel 3
+ No transmit
+ Echo
+ Echo 5s
+ Echo 10s
+ Fortunes
+ Fortunes: Pauses ×2
+ Fortunes: Pauses ×4
+ Fortunes: Pauses ×8
+
+
+
+
+ rx
+
+
+
+ If you can read this, it means the browser needs you to click somewhere on this page
+ before it will start beeping!
+
+
+
+
+
+ Keyer mode:
+
+ Straight Key / Cootie
+ Bug
+ ElBug
+ Single Dot
+ Ultimatic
+ Iambic (Plain)
+ Iambic A
+ Iambic B
+ Keyahead
+
+
+
+
+ Keyer speed:
+
+ WPM
+
+
+ Knobs
+
+
+
+ CK
+
+ Send CK
(check) to the repeater, and play when it comes back.
+
+
+
+
+
+ Reset
+
+ Reset all Vail preferences to default.
+
+
+
+ Receive delay:
+
+ seconds
+
+
+
+
+
+ Telegraph sounds
+
+
+
+
+
+
+
diff --git a/static/index.html b/static/index.html
index 89bd975..46f2193 100644
--- a/static/index.html
+++ b/static/index.html
@@ -27,7 +27,7 @@
@@ -145,7 +145,9 @@
- WPM
+ WPM
+ /
+ ms
diff --git a/static/inputs.mjs b/static/inputs.mjs
index 901d5f5..56b4d52 100644
--- a/static/inputs.mjs
+++ b/static/inputs.mjs
@@ -65,7 +65,7 @@ export class Keyboard extends Input{
(event.code == "KeyX")
|| (event.code == "Period")
|| (event.code == "BracketLeft")
- || (event.code == "ControlLeft" && this.iambic) // VBand
+ || (event.code == "ControlLeft")
|| (event.key == "[")
) {
// Dit
@@ -78,7 +78,7 @@ export class Keyboard extends Input{
(event.code == "KeyZ")
|| (event.code == "Slash")
|| (event.code == "BracketRight")
- || (event.code == "ControlRight" && this.iambic) // VBand
+ || (event.code == "ControlRight")
|| (event.key == "]")
) {
if (this.dahDown != down) {
@@ -90,7 +90,6 @@ export class Keyboard extends Input{
(event.code == "KeyC")
|| (event.code == "Comma")
|| (event.key == "Enter")
- || (event.key == "Control" && !this.iambic) // VBand
|| (event.key == "NumpadEnter")
) {
if (this.straightDown != down) {
diff --git a/static/space.png b/static/space.png
new file mode 100644
index 0000000..505e352
Binary files /dev/null and b/static/space.png differ
diff --git a/static/vail.css b/static/vail.css
index a26941c..4723afc 100644
--- a/static/vail.css
+++ b/static/vail.css
@@ -3,7 +3,7 @@
}
.key {
- width: 95%;
+ width: 95%;
height: 6em;
}
@@ -53,6 +53,7 @@ input[type=range] {
kbd {
background-color: #eee;
+ color: black;
border: 1px solid #bbb;
border-radius: 3px;
font-size: 66%;
diff --git a/static/vail.mjs b/static/vail.mjs
index 1a89366..15937a2 100644
--- a/static/vail.mjs
+++ b/static/vail.mjs
@@ -63,15 +63,18 @@ class VailClient {
this.inputInit("#keyer-mode", e => this.setKeyer(e.target.value))
this.inputInit("#keyer-rate", e => {
let rate = e.target.value
- let ditDuration = Minute / rate / 50
- this.keyer.SetDitDuration(ditDuration)
- this.roboKeyer.SetDitDuration(ditDuration)
+ this.ditDuration = Minute / rate / 50
+ for (let e of document.querySelectorAll("[data-fill='keyer-ms']")) {
+ e.textContent = this.ditDuration.toFixed(0)
+ }
+ this.keyer.SetDitDuration(this.ditDuration)
+ this.roboKeyer.SetDitDuration(this.ditDuration)
for (let i of Object.values(this.inputs)) {
- i.SetDitDuration(ditDuration)
+ i.SetDitDuration(this.ditDuration)
}
})
this.inputInit("#rx-delay", e => {
- this.rxDelay = Number(e.target.value)
+ this.rxDelay = e.target.value * Second
})
this.inputInit("#telegraph-buzzer", e => {
this.setTelegraphBuzzer(e.target.checked)
@@ -193,6 +196,9 @@ class VailClient {
// XXX: UI code shouldn't be in the Keyer class.
// Actually, the charts calls should be in vail
let chartsContainer = document.querySelector("#charts")
+ if (!chartsContainer) {
+ return
+ }
if (enable) {
chartsContainer.classList.remove("hidden")
this.keyCharts = [
@@ -415,7 +421,7 @@ class VailClient {
*/
test() {
let when = Date.now()
- let dit = Number(document.querySelector("#iambic-duration-value").value)
+ let dit = this.ditDuration
let dah = dit * 3
let s = dit
let message = [