Control-/
is not a part of the set of standard control codes. It is not directly representable as a keystroke in many terminal emulations. Such a keystroke is only properly detectable in certain platform-specific “scancode modes” or “GUI mode” (where the API tells you exactly which keys and modifiers are being used). Your terminal emulator is beeping because it is effectively an invalid keystroke.
The standard control codes only cover “Control” versions of
@
A
–Z
[\]^_
(ASCII 0 - 31), and
?
(ASCII 127)
In most terminal emulator programs running with most US key layouts you may need to press Shift to generate some of the “Control codes”:
- C-@ is ControlShift2 (since
@
is Shift2)
- C-^ is ControlShift6 (since
^
is Shift6)
- C-_ is ControlShift- (since
_
is Shift-)
- However, C-? may not always be ControlShift/ (since
?
is Shift/); C-? is usually generated by either Backspace (on Apple keyboards, the key labeled just “delete” without the additional symbol ⌦) or Delete (the one with ⌦ on Apple keyboards).
In tty-based Emacs, you can usually use C-_ for undo
instead of C-/.