Skip to content

Commit e7850fd

Browse files
feat: Document punctuation key sequences
Stainless-Generated-From: 16c95773a23ee13f801cdb8e6685186475f077a0
1 parent 8197238 commit e7850fd

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

‎src/kernel/resources/browsers/computer.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,9 @@ def press_key(
397397
keys: List of key symbols to press. Each item should be a key symbol supported by
398398
xdotool (see X11 keysym definitions). Examples include "Return", "Shift",
399399
"Ctrl", "Alt", "F5". Items in this list could also be combinations, e.g.
400-
"Ctrl+t" or "Ctrl+Shift+Tab".
400+
"Ctrl+t" or "Ctrl+Shift+Tab". Use X11 names for punctuation in combinations,
401+
such as "Ctrl+minus" or "Ctrl+plus". A literal hyphen is also accepted as an
402+
alias, so "Ctrl+-" is normalized to "Ctrl+minus".
401403
402404
duration: Duration to hold the keys down in milliseconds. If omitted or 0, keys are
403405
tapped.
@@ -1002,7 +1004,9 @@ async def press_key(
10021004
keys: List of key symbols to press. Each item should be a key symbol supported by
10031005
xdotool (see X11 keysym definitions). Examples include "Return", "Shift",
10041006
"Ctrl", "Alt", "F5". Items in this list could also be combinations, e.g.
1005-
"Ctrl+t" or "Ctrl+Shift+Tab".
1007+
"Ctrl+t" or "Ctrl+Shift+Tab". Use X11 names for punctuation in combinations,
1008+
such as "Ctrl+minus" or "Ctrl+plus". A literal hyphen is also accepted as an
1009+
alias, so "Ctrl+-" is normalized to "Ctrl+minus".
10061010
10071011
duration: Duration to hold the keys down in milliseconds. If omitted or 0, keys are
10081012
tapped.

‎src/kernel/types/browsers/computer_batch_params.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ class ActionPressKey(TypedDict, total=False):
110110
111111
Each item should be a key symbol supported by xdotool (see X11 keysym
112112
definitions). Examples include "Return", "Shift", "Ctrl", "Alt", "F5". Items in
113-
this list could also be combinations, e.g. "Ctrl+t" or "Ctrl+Shift+Tab".
113+
this list could also be combinations, e.g. "Ctrl+t" or "Ctrl+Shift+Tab". Use X11
114+
names for punctuation in combinations, such as "Ctrl+minus" or "Ctrl+plus". A
115+
literal hyphen is also accepted as an alias, so "Ctrl+-" is normalized to
116+
"Ctrl+minus".
114117
"""
115118

116119
duration: int

‎src/kernel/types/browsers/computer_press_key_params.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ class ComputerPressKeyParams(TypedDict, total=False):
1515
1616
Each item should be a key symbol supported by xdotool (see X11 keysym
1717
definitions). Examples include "Return", "Shift", "Ctrl", "Alt", "F5". Items in
18-
this list could also be combinations, e.g. "Ctrl+t" or "Ctrl+Shift+Tab".
18+
this list could also be combinations, e.g. "Ctrl+t" or "Ctrl+Shift+Tab". Use X11
19+
names for punctuation in combinations, such as "Ctrl+minus" or "Ctrl+plus". A
20+
literal hyphen is also accepted as an alias, so "Ctrl+-" is normalized to
21+
"Ctrl+minus".
1922
"""
2023

2124
duration: int

0 commit comments

Comments
 (0)