What is the key denoted by ^@ when typed in the terminal?
My system is getting spammed by this key, so I have to disable it.
What is the key denoted by ^@ when typed in the terminal?
My system is getting spammed by this key, so I have to disable it.
^@ is not a key, it's the representation of a control character. In that case the NUL character, the one with byte value 0.
If n is the byte value of X, then the byte value of ^X will be n ^ 0x40.
You can tell the byte value of X with:
printf X | od -An -tu1 or (for single byte characters):
printf '%d\n' "'X" So here:
$ printf '%s\n' "'@" 64 $ echo "$((64 ^ 0x40))" 0 For ^?:
$ printf '%s\n' "'?" 63 $ echo "$((63 ^ 0x40))" 127 (that's the DEL character).
Depending on the terminal, you may be able to enter it by pressing Ctrl+Space or Ctrl+@. On my UK keyboard in xterm on Debian, I get it on Ctrl+2 (shift 2 is " on a UK keyboard, but @ on a US keyboard).
The NUL character is ignored by terminals and terminal emulators. It's a padding character which in the olden days would have been used by applications to let give the terminal time between two other control characters when there was no flow control.
You'd see that ^@ in a terminal in applications like vim that choose it as the visual representation of a NUL. You would also typically see it as the echo of a NUL character you enter on input. Either by the terminal driver itself when the terminal line discipline is in icanon mode and the echoctl parameter is enabled (generally on by default, see stty -a), or by line editors in applications (like readline used by bash).
^@ as if they had been entered on the keyboard (can you delete them with backspace?) ? Or are they being output by some application? What is running in that terminal when that happens? What's the terminal? A real terminal? A terminal emulator like xterm? Please edit your question to add the extra information. That is character 0, ctrl-@. Eg. Ctrl-A is character 1, Ctrl-M character 13 or newline.