diff options
author | Jacob Moody <moody@posixcafe.org> | 2022-09-28 02:33:23 +0000 |
---|---|---|
committer | Jacob Moody <moody@posixcafe.org> | 2022-09-28 02:33:23 +0000 |
commit | a1d252ff9b58c9c9bf3bf8765e4cf2c988ed51d4 (patch) | |
tree | 63261e6e69ead15b279d537dbc1f461577425e9e /sys/src/cmd/ktrans | |
parent | 03f9392b3a4583f36b8c5d961733bae00bc9417e (diff) |
rio: ensure single reader and single writer for kbdtap
Multiple readers eat each other's lunch, and it makes more
sense to limit use to one 'pipeline' then just one reader.
This also brings back the 'focus' message from kbdtap used
by ktrans to reset its line buffers when the user switches
windows. An event file was considered, but deemed harmful
to the artwork. To paraphrase an old excuse found in the code:
"rio just isn't structured for that. Apologies."
Diffstat (limited to 'sys/src/cmd/ktrans')
-rw-r--r-- | sys/src/cmd/ktrans/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/cmd/ktrans/main.c b/sys/src/cmd/ktrans/main.c index f4f2a744e..6c702c1e6 100644 --- a/sys/src/cmd/ktrans/main.c +++ b/sys/src/cmd/ktrans/main.c @@ -497,7 +497,7 @@ keythread(void*) threadsetname("keytrans"); while(recv(input, &m) != -1){ - if(m.code == 'r'){ + if(m.code == 'z'){ emitutf(dictch, "", 1); resetstr(&line, nil); continue; @@ -609,7 +609,7 @@ Drop: p++; switch(msg.code){ case 'c': case 'k': case 'K': - case 'r': + case 'z': break; default: goto Drop; |