mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-27 15:17:38 +00:00
Hack Warp Enter
This commit is contained in:
parent
4fb6e925ac
commit
0e8b0d199a
1 changed files with 6 additions and 4 deletions
|
|
@ -164,6 +164,8 @@ enum Terminal: String, CaseIterable {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Special handling for Warp terminal
|
// Special handling for Warp terminal
|
||||||
|
// Warp doesn't recognize standard key codes for Enter (36 or 76)
|
||||||
|
// and requires ASCII character 13 (carriage return) to execute commands
|
||||||
if self == .warp {
|
if self == .warp {
|
||||||
return """
|
return """
|
||||||
tell application "\(processName)"
|
tell application "\(processName)"
|
||||||
|
|
@ -171,12 +173,12 @@ enum Terminal: String, CaseIterable {
|
||||||
tell application "System Events"
|
tell application "System Events"
|
||||||
-- Create new window
|
-- Create new window
|
||||||
keystroke "n" using {command down}
|
keystroke "n" using {command down}
|
||||||
delay 0.5
|
delay 1.0
|
||||||
-- Paste command from clipboard
|
-- Paste command from clipboard
|
||||||
keystroke "v" using {command down}
|
keystroke "v" using {command down}
|
||||||
delay 0.3
|
delay 0.5
|
||||||
-- Try numeric keypad Enter with small delay
|
-- Warp requires ASCII character 13 instead of key code 36
|
||||||
key code 76
|
keystroke (ASCII character 13)
|
||||||
end tell
|
end tell
|
||||||
end tell
|
end tell
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue