Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion js/interface/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,12 @@ addEventListeners(document, 'keydown mousedown', function(e) {
if (Keybinds.recording || e.which < 4) return;
//Shift


// Normalize Backspace/Delete key (8) to Delete keycode (46) when not in text input
// On macOS, the Delete key above Return sends keycode 8
if (e.which === 8 && !getFocusedTextInput()) {
Object.defineProperty(e, 'which', {value: 46, writable: false, configurable: true});
}

let modifiers_changed = Pressing.shift != e.shiftKey || Pressing.alt != e.altKey || Pressing.ctrl != e.ctrlKey;
let before = modifiers_changed && {shift: Pressing.shift, alt: Pressing.alt, ctrl: Pressing.ctrl};
Pressing.shift = e.shiftKey;
Expand Down