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
299 static int collecting, nk;299 static int collecting, nk;
300 static Rune kc[5];300 static Rune kc[5];
301 301
302 if(c == Kalt){302 switch(c){
303 collecting = 1;303 case 0:
304 nk = 0;304 case Kcaps:
305 return 0;305 case Knum:
306 }306 case Kshift:
307 307 case Kaltgr:
308 if(!collecting){308 case Kmod4:
309 _kbdputc(c);309 case Kctl:
310 return 0;310 /* ignore modifiers */
311 }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 }
312 323
313 kc[nk++] = c;324 kc[nk++] = c;
314 c = latin1(kc, nk);325 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