History

devcons: we have to ignore modifier keys, just as kbdfs for raw mode

cinap_lenrek committed 3 years ago

Commit 7ccc4331 parent 06d141d1 file · +21 −10Browse files

Unified · Split

kern/devcons.c+21−10
@@ -299,16 +299,27 @@ kbdputc(Queue *q, int c) · 298 unmodified lines
299299 static int collecting, nk;
300300 static Rune kc[5];
301301
302− if(c == Kalt){
303− collecting = 1;
304− nk = 0;
305− return 0;
306− }
307−
308− if(!collecting){
309− _kbdputc(c);
310− return 0;
311− }
302+ switch(c){
303+ case 0:
304+ case Kcaps:
305+ case Knum:
306+ case Kshift:
307+ case Kaltgr:
308+ case Kmod4:
309+ case Kctl:
310+ /* ignore modifiers */
311+ return 0;
312+
313+ case Kalt:
314+ collecting = 1;
315+ nk = 0;
316+ return 0;
317+ }
318+
319+ if(!collecting){
320+ _kbdputc(c);
321+ return 0;
322+ }
312323
313324 kc[nk++] = c;
314325 c = latin1(kc, nk);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t