Skip to content

Mapping key presses to remote control send-text command fails #3147

Closed
@felixge

Description

@felixge

Describe the bug

I'm trying to map a key to send-text. But when invoking the key I get the following error:

remote_control mapping failed

'NoneType' object has no attribute 'partition'

To Reproduce

Steps to reproduce the behavior:

  1. Edit kitty.conf
allow_remote_control yes
map ctrl+enter remote_control send-text hi
  1. Relaunch kitty
  2. Hit ctrl+enter
  3. Observe the error shown above.

Expected behavior

The text hi should appear in the active window.

Environment details

OS: Mac OS 10.15.7

$ kitty --debug-config --config kitty.conf 
kitty 0.19.2 created by Kovid Goyal
Darwin felix-mbp-2089.local 19.6.0 Darwin Kernel Version 19.6.0: Thu Oct 29 22:56:45 PDT 2020; root:xnu-6153.141.2.2~1/RELEASE_X86_64 x86_64
ProductName:	Mac OS X ProductVersion:	10.15.7 BuildVersion:	19H15
Loaded config files: kitty.conf

Config options different from defaults:
allow_remote_control y
Added shortcuts:
	control+enter KeyAction(func='remote_control', args=['set-spacing', 'margin=30'])

Additional context

I can reproduce the issue kitty --config kitty.conf that contains only the 2 lines of config shown above.

This issue seems to be specific to send-text. The following config works as expected:

allow_remote_control yes
map ctrl+enter remote_control set-spacing margin=30

Thanks for all your work on kitty, it's greatly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions