mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-03 12:24:40 +00:00
terminal: KAM (mode 2)
This has an associated config `vt-kam-allowed` which defaults to "false" since this mode can cause the terminal to become mostly unusable. We include this mode for completions sake however.
This commit is contained in:
28
website/app/vt/modes/kam/page.mdx
Normal file
28
website/app/vt/modes/kam/page.mdx
Normal file
@@ -0,0 +1,28 @@
|
||||
import VTMode from "@/components/VTMode";
|
||||
|
||||
# Keyboard Action Mode (KAM)
|
||||
|
||||
<VTMode value={2} ansi={true} />
|
||||
|
||||
Disable all keyboard input.
|
||||
|
||||
This mode is unset as part of both [full reset (RIS)](/vt/ris)
|
||||
and [soft reset (DECSTR)](/vt/decstr).
|
||||
|
||||
A poorly behaved terminal program can lock the terminal emulator
|
||||
using this command. Terminal emulators should provide a mechanism
|
||||
to reset this or outright disable it.
|
||||
|
||||
## Validation
|
||||
|
||||
### KAM V-1: Disable Keyboard Input
|
||||
|
||||
```bash
|
||||
printf "\033[1;1H" # move to top-left
|
||||
printf "\033[0J" # clear screen
|
||||
printf "Keyboard input is now disabled.\n"
|
||||
printf "\033[2h"
|
||||
sleep 5
|
||||
printf "\033[2l"
|
||||
printf "Keyboard input is re-enabled.\n"
|
||||
```
|
||||
18
website/components/VTMode.tsx
Normal file
18
website/components/VTMode.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
export default function VTMode({
|
||||
value,
|
||||
ansi = false,
|
||||
}: {
|
||||
value: number;
|
||||
ansi: boolean;
|
||||
}) {
|
||||
return (
|
||||
<div className="flex my-2.5">
|
||||
<div className="border px-1 grid grid-rows-2 grid-cols-1 text-center">
|
||||
<div>
|
||||
{ansi ? "?" : ""}
|
||||
{value}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user