SchOS/kernel/dev
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nexoniarz fe2f5e1bf8 tty: Ctrl+Alt+Shift+F1..F6, and VT_SETMODE actually works
Alt+1..6 was a worse choice than the Alt+F-keys it replaced, and the reason
is the one that matters: anything the kernel swallows is taken from every
program that will ever run here, permanently.

Alt+<digit> is Meta-digit. zsh's own line editor binds it as digit-argument --
Alt+1 Alt+2 x repeats x twelve times -- and every readline editor does the
same. Yesterday's chord broke that system-wide, which is exactly the failure
mode of picking a chord applications want.

Working the whole space instead of one axis of it:

  the HOST takes    Alt+F4, Alt+F2, Ctrl+Alt+F1..F6
  APPLICATIONS want Alt+anything (Meta), Ctrl+letter, Ctrl+Shift+digit
                    (Ctrl+Shift+2 types ^@), bare F-keys
  the LAYOUT wants  AltGr+letter -- Polish diacritics

Ctrl+Alt+Shift+F1..F6 is in none of those sets. Display managers bind the same
chord without Shift, so adding it steps out of the host's way, and no terminal
application binds a triple-modified function key.

Which chords actually reach a guest was measured rather than assumed: a
temporary probe in kbdgetc logged every modified keypress and QEMU's sendkey
fired each candidate at it. Everything reached the guest, Ctrl+Alt+F2
included -- so that conflict is the host's display manager, not QEMU. The same
probe corrected an earlier claim: `sendkey altgr-2` produces no event at all,
so the previous commit's "AltGr+2 did not fire" was never actually tested.

And the escape hatch is real now. VT_SETMODE was accepted and ignored, so a
program could ask to own the chord, be told yes, and still not get it.
VT_PROCESS genuinely stops the kernel switching. Together with the EVIOCGRAB
path -- which kbdgetc already checks before the chord is recognised -- there
are three honest layers: nothing, VT_PROCESS, exclusive grab.

What VT_PROCESS still does not do is the VT_RELDISP handshake; struct vt_mode
carries relsig/acqsig for when Schcom needs to release the GPU before the
screen changes hands.

Verified by screendump hash: Alt+2 reaches zsh as Meta, Ctrl+Alt+F2 and
Ctrl+Shift+F2 leave the screen untouched, Ctrl+Alt+Shift+F2 switches.
schfs-check passes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VQ7Qx8E1q1M1bbCq8QLHS2
2026-09-13 13:05:43 +02:00
..
bio.c fs: timestamps come from the clock, and /proc/fsstat says how full the tables are 2026-09-12 17:14:14 +02:00
cdev.c tty: six virtual terminals, and the plumbing that makes them terminals 2026-09-13 00:08:00 +02:00
device.c net: a network *class*, so the stack stops knowing what an e1000 is 2026-08-15 16:42:34 +02:00
disk.c dev: raw disks are 64-bit, so a real drive stops wrapping at 4 GB 2026-08-11 12:15:38 +02:00
fb.c gfx: the console and the crash screen stop drawing on a driver by name 2026-08-15 17:04:10 +02:00
gfx.c tty: the grid was 80x24 on a 160x50 screen, and wrapping was eager 2026-09-13 12:49:13 +02:00
ide.c schfs: the commit barrier, reflink, and attributes with an index over them 2026-08-15 16:02:02 +02:00
input.c kernel: the clock ran 7x slow because the GPU never acknowledged its interrupt 2026-09-12 21:34:36 +02:00
irq.c kernel: the clock ran 7x slow because the GPU never acknowledged its interrupt 2026-09-12 21:34:36 +02:00
kbd.c tty: Ctrl+Alt+Shift+F1..F6, and VT_SETMODE actually works 2026-09-13 13:05:43 +02:00
mouse.c gfx: the console and the crash screen stop drawing on a driver by name 2026-08-15 17:04:10 +02:00
pci.c net: a network *class*, so the stack stops knowing what an e1000 is 2026-08-15 16:42:34 +02:00
procfs.c kernel: the clock ran 7x slow because the GPU never acknowledged its interrupt 2026-09-12 21:34:36 +02:00
ramdisk.c Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
text.c Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
ttf.c Rename Schunix to SchOS; the kernel becomes SchIFT 2026-08-09 14:09:59 +02:00
uart.c Rename Schunix to SchOS; the kernel becomes SchIFT 2026-08-09 14:09:59 +02:00
vt.c tty: Ctrl+Alt+Shift+F1..F6, and VT_SETMODE actually works 2026-09-13 13:05:43 +02:00