Fixed race condition
This commit is contained in:
parent
b941235007
commit
a2e9ce6aeb
|
@ -107,7 +107,7 @@ for {
|
|||
}
|
||||
|
||||
inputString = addXDoToolIfNonQWERTY(string(readData))
|
||||
input := []byte("@{payload delimiter}" + inputString)
|
||||
input := []byte(inputString)
|
||||
if len(input) > 0 {
|
||||
err = client.WriteMessage(websocket.TextMessage, input)
|
||||
if err != nil {
|
||||
|
@ -147,7 +147,7 @@ for {
|
|||
}
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = client.WriteMessage(websocket.TextMessage, []byte("@{payload delimiter}" + key))
|
||||
err = client.WriteMessage(websocket.TextMessage, []byte(key))
|
||||
if err != nil {
|
||||
log.Fatal("write:", err)
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ Copyright [Kevin Froman](https://chaoswebs.net/) [Licensed under GPLv3](LICENSE.
|
|||
Work in progress
|
||||
|
||||
--- version
|
||||
2.0.0
|
||||
3.0.0
|
||||
---
|
||||
|
||||
|
||||
|
|
|
@ -248,13 +248,13 @@ try:
|
|||
except KeyError:
|
||||
print("Unknown key: " + str(e_code))
|
||||
if event.value == 1:
|
||||
key_str = "@{keydown cmd}" + key_str
|
||||
key_str = "@{payload delimiter}@{keydown cmd}" + key_str
|
||||
log.append(e_code)
|
||||
quit_if_necessry(log)
|
||||
elif event.value == 0:
|
||||
key_str = "@{keyup cmd}" + key_str
|
||||
key_str = "@{payload delimiter}@{keyup cmd}" + key_str
|
||||
elif event.value == 2:
|
||||
key_str = "@{keyheld cmd}" + key_str
|
||||
key_str = "@{payload delimiter}@{keyheld cmd}" + key_str
|
||||
else:
|
||||
print("Unknown value: " + str(event.value))
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue