-
Notifications
You must be signed in to change notification settings - Fork 0
Shortcuts
src/hotkeys.cpp, src/hotkeys.h
| Key | Action |
|---|---|
| Enter | Fullscreen |
| Esc | Leave fullscreen |
| F1 | Statistics |
| F2 | Settings |
| F5 | Restart capture |
| F9 | Start / stop recording |
| F10 | Screenshot |
| M | Mute |
+ / - or mouse wheel |
Volume |
| Ctrl+1 … Ctrl+9 | Switch profile |
| Right click | Menu |
All of these except Esc, the profile digits and Alt+F4 can be reassigned under Settings → Keys.
// Escape always leaves fullscreen and closes the dialog, and Ctrl+1..9 always
// picks a profile: both are conventions people expect to hold, and a binding
// editor that lets you break your way out of fullscreen is a trap rather than
// a feature.That is the whole reasoning. A UI that lets you rebind Escape produces a program you can get stuck inside.
enum class HotkeyAction {
Fullscreen, Settings, Stats, RestartCapture, Record, Screenshot,
Mute, VolumeUp, VolumeDown, Count
};
struct HotkeyBinding {
int vk = 0; // 0 = unbound
bool ctrl, shift, alt;
};Nine actions, each with one binding, held in a Hotkeys struct indexed by the
enum. HotkeyAction::Count doubles as "no action bound to this combination",
which is what Hotkeys::Find() returns on a miss.
Modifiers must match exactly — HotkeyBinding::Matches() compares all three,
so F9 and Shift+F9 are different bindings rather than one swallowing the other.
Each action has three strings, and they are deliberately separate:
HotkeyActionName() |
the label in the settings and the context menu, in the current language |
HotkeyActionKey() |
what is written to CapView.json — language-independent and stable |
HotkeyText() |
"Strg+Umschalt+F9", or empty when unbound |
The middle one matters: a config file written in German and read in English has to name the same action. The first and third are display only.
The combination text comes from the keyboard layout through
GetKeyNameTextW, so a French keyboard reads its own labels rather than a
translation of the American ones.
IsReservedKey() returns true for keys that must not be swallowed as a shortcut:
- Escape — fixed, for the reason above
- The modifiers themselves — Ctrl, Shift, Alt and both Windows keys, left and right variants included. A modifier alone is not a shortcut
- F4 — it would collide with Alt+F4
The binding editor refuses these rather than accepting them and behaving oddly later.
The context menu (right click) shows the same actions with their current combinations, so a rebound key is discoverable without opening the settings.
The button strip along the top is on by default, and everything it offers is also
on a key — but a key you have to know about first. showToolbar in
AppSettings turns it off for anyone who does.
The picture is fitted below the toolbar rather than drawn underneath it
(VideoRenderer::SetTopInset()), so the bar never covers what you are playing.
F1 cycles StatsDetail, which has three levels:
StatsDetail |
Shows |
|---|---|
Compact |
Frame rates and frame age |
Normal |
Those, plus capture format, colour handling and audio buffer |
Full |
Everything, including device names and dropped frame counts |
Normal is where a wrong colour range verdict becomes visible. The virtual
camera reports itself elsewhere: Settings > Recording lists every program
reading it, with the format each one negotiated.