Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions app/tabs/sessions/Sessions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ export default function Sessions() {
: null;
if (!activeRef?.current) return;

if (event.shift && event.input === "\t") {
activeRef.current.sendInput("\x1b[Z");
if (event.input === "\t") {
activeRef.current.sendInput(event.shift ? "\x1b[Z" : "\t");
return;
}

Expand Down
6 changes: 6 additions & 0 deletions modules/hardware-keyboard/ios/HardwareKeyboardModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ extension UIViewController {
rightCmd.wantsPriorityOverSystemBehavior = true
commands.append(rightCmd)

// Tab (unmodified)
let tab = UIKeyCommand(input: "\t", modifierFlags: [], action: #selector(hk_handleTab))
tab.wantsPriorityOverSystemBehavior = true
commands.append(tab)

// Escape
let esc = UIKeyCommand(input: UIKeyCommand.inputEscape, modifierFlags: [], action: #selector(hk_handleEscape))
esc.wantsPriorityOverSystemBehavior = true
Expand All @@ -92,6 +97,7 @@ extension UIViewController {
return commands
}

@objc func hk_handleTab() { HardwareKeyboardModule.emitToAll("\t", shift: false) }
@objc func hk_handleShiftTab() { HardwareKeyboardModule.emitToAll("\t", shift: true) }
@objc func hk_handleArrowUp() { HardwareKeyboardModule.emitToAll("ArrowUp", shift: false) }
@objc func hk_handleArrowDown() { HardwareKeyboardModule.emitToAll("ArrowDown", shift: false) }
Expand Down