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 like field:query. The field can be one of: id, title, pid, cwd, cmdline, num, env, var, state, neighbor, session and recent. And query is 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 are field:query, where field can be one of: id, index, title, window_id, window_title, pid, cwd, cmdline env, var, state, session and recent. query is 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-on option or the listen_on setting in kitty.conf. If it's not specified, the environment variable KITTY_LISTEN_ON is 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 in kitty.conf. To use a blank password, specify --use-password as always ๐Ÿซฅ.
  • --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. Use fd:num to read from the file descriptor num. This is used if no --password is supplied. Defaults to checking for the rc-pass file 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-file is supplied. Defaults to checking the environment variable KITTY_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 to always and 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