hidShiftPollingEnabled function
Whether the session may poll the HID Shift state at all: the
FA_TUI_SHIFT_HID kill switch wins, then SSH detection — an SSH
session has no WindowServer attach, so the CoreGraphics call blocks
instead of answering (issue #355).
Implementation
bool hidShiftPollingEnabled(Map<String, String> env) {
final value = env['FA_TUI_SHIFT_HID']?.trim().toLowerCase();
if (value == '0' || value == 'false' || value == 'no' || value == 'off') {
return false;
}
return env['SSH_CONNECTION'] == null && env['SSH_TTY'] == null;
}