kitten-@-send-key(1)
๐ NAME ๐
kitten-@-send-key โ the manual page for the lil remote-control kitten that sends arbitrary key presses to the windows you point at ๐นโจ (yes bestie, it's from the kitten manual โ told you it was iconic).
๐ธ USAGE ๐ธ
kitten @ send-key [KEYS TO SEND ...]
๐ฆ DESCRIPTION ๐ฆ
Okay so here's the vibe: this kitten sends arbitrary key presses to the windows you specify ๐. Every key you list gets sent first as press events, then as release events in reverse order โ like a tiny keyboard ballet, no cap ๐ฉฐ.
The keys go to the programs running in those windows. But โ and this is the important part โ they're sent only if the current keyboard mode for the program supports that particular key. So it's lowkey picky, not a bulldozer.
Example time, because seeing it is believing:
send-key ctrl+a ctrl+b
โ ๏ธ Big caveat bestie: errors are not reported, for technical reasons. So send-key always succeeds โ even if no key was sent to any window ๐ญ. It's giving "ghosted but polite." It said slay and moved on.
โจ OPTIONS โจ
--match,-mโ the window you want to match ๐ฏ. Match specs look likefield:query. Thefieldcan be one of:id,title,pid,cwd,cmdline,num,env,var,state,neighbor,sessionandrecent. Andqueryis the expression you're matching โ it can be a number or a regular expression, and you can combine expressions with Boolean operators ๐ซ.
The special value all matches, you guessed it, all windows ๐.
For the numeric fields โ id, pid, num and recent โ the expression is interpreted as a number, not a regular expression. Negative values for id match from the highest id number down, and in particular, -1 is the most recently created window ๐.
The field num refers to the window position in the current tab, starting from zero and counting clockwise (same order the windows get reported by the kitten @ ls command, iykyk) ๐.
The window id of the current window is available as the KITTY_WINDOW_ID environment variable ๐ท๏ธ.
The field recent refers to recently active windows in the currently active tab โ 0 is the currently active window, 1 is the previously active one, and so on down the line โฎ๏ธ.
The field neighbor refers to a neighbor of the active window in the specified direction, which can be: left, right, top or bottom ๐งญ.
The field session matches windows that were created in the specified session. Use the expression ^$ to match windows that were not created in a session, . to match the currently active session, and ~ to match either the currently active session or the last active session when no session is active ๐.
When you're using the env field to match on environment variables, you can specify just the environment variable name, or a name and value โ for example, env:MY_ENV_VAR=2 ๐ฑ.
Similarly, the var field matches on user variables set on the window. You can specify name, or name and value, exactly like with the env field ๐ซถ.
The field state matches on the state of the window. Supported states are: active, focused, needs_attention, parent_active, parent_focused, focused_os_window, self, overlay_parent. Active windows are the windows that are active in their parent tab. There is only one focused window, and it is the window to which keyboard events are delivered. If no window is focused, the last focused window is matched. The value focused_os_window matches all windows in the currently focused OS window. The value self matches the window in which the remote control command is run. The value overlay_parent matches the window that is under the self window, when the self window is an overlay ๐.
Anddd you can use the kitten @ ls command to get a list of windows, if you need to peek at what's there ๐.
--match-tab,-tโ the tab you want to match ๐๏ธ. Match specs arefield:query, wherefieldcan be one of:id,index,title,window_id,window_title,pid,cwd,cmdlineenv,var,state,sessionandrecent.queryis the expression to match โ number or regular expression, combinable with Boolean operators ๐ซ.
The special value all matches all tabs ๐.
For the numeric fields โ id, index, window_id, pid and recent โ the expression is interpreted as a number, not a regular expression. Negative values for id/window_id match from the highest id number down, and in particular, -1 is the most recently created tab/window ๐.
When using title or id, first a matching tab is looked for, and if it's not found, a matching window is looked for, and the tab for that window is used ๐.
You can also use window_id and window_title to match the tab that contains the window with the specified id or title ๐ช.
The index number matches the nth tab in the currently active OS window. The recent number matches recently active tabs in the currently active OS window โ 0 is the currently active tab, 1 the previously active one, and so on โฎ๏ธ.
The field session matches tabs that were created in the specified session. Use the expression ^$ to match windows that were not created in a session, . to match the currently active session, and ~ to match either the currently active session or the last active session when no session is active ๐.
When using the env field to match on environment variables, you can specify just the environment variable name, or a name and value โ for example, env:MY_ENV_VAR=2. Tabs containing any window with the specified environment variables are matched. Similarly, var matches tabs containing any window with the specified user variable ๐ฑ.
The field state matches on the state of the tab. Supported states are: active, focused, needs_attention, parent_active, parent_focused and focused_os_window. Active tabs are the tabs that are active in their parent OS window. There is only one focused tab, and it is the tab to which keyboard events are delivered. If no tab is focused, the last focused tab is matched. The value focused_os_window matches all tabs in the currently focused OS window ๐
Annnd you can use the kitten @ ls command to get a list of tabs ๐.
--all [=no]โ match all windows, periodt ๐ฏ.--exclude-active [=no]โ do not send text to the active window, even if it's one of the matched windows ๐ โโ๏ธ. (Yes, even then. Especially then.)--help,-h [=no]โ show help for this command ๐.
๐ GLOBAL OPTIONS ๐
--toโ an address for the kitty instance to control ๐ฎ. It corresponds to the address given to the kitty instance via the--listen-onoption or thelisten_onsetting inkitty.conf. If it's not specified, the environment variableKITTY_LISTEN_ONis checked. And if that's also not found, messages are sent to the controlling terminal for this process โ i.e. they'll only work if this process is run within a kitty window ๐ช.--passwordโ a password to use when contacting kitty ๐. This will cause kitty to ask the user for permission to perform the specified action, unless the password has already been accepted before or is pre-configured inkitty.conf. To use a blank password, specify--use-passwordasalways๐ซฅ.--password-file [=rc-pass]โ a file to read the password from ๐. Trailing whitespace is ignored. Relative paths are resolved from the kitty configuration directory. Use-to read from STDIN. Usefd:numto read from the file descriptornum. This is used if no--passwordis supplied. Defaults to checking for therc-passfile in the kitty configuration directory ๐.--password-env [=KITTY_RC_PASSWORD]โ the name of an environment variable to read the password from ๐ฟ. Used if no--password-fileis supplied. Defaults to checking the environment variableKITTY_RC_PASSWORD.--use-password [=if-available]โ if no password is available, kitty will usually just send the remote control command without a password. This option can be used to force it to always or never use the supplied password ๐ . If set toalwaysand no password is provided, the blank password is used.
Choices: if-available, always, never.
๐ซถ Friendly reminder from your girl: send-key is the "always succeeds" girly. Don't come for her when nothing happens โ she literally cannot tell you ๐ญ.
And that's the whole page, bestie! This lil masterpiece is from version 0.49.2, dated Oct 01, 2026 โ the kitten-@-send-key manual page, slaying in a terminal near you ๐๐๐ฆโญ๐
๐ฆ where this page comes from
- arch rolling: kitty 0.49.2-1 ยท GPL-3.0-only
- nixpkgs unstable: kitty-bin 0.49.2
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms