Skip to content

Force Control keys to lower case (ctrl-a instead of ctrl-A) #1875

@flashcode

Description

@flashcode

Feature description

Actual behavior

When binding a Control key like ctrl-Q, WeeChat expects it to be upper case.

That means with such command:

/key bind ctrl-q /print test

The key ctrl-q is accepted and added but does not work. This is misleading for the user.

Proposed behavior

Purpose is to force lower case when a Ctrl key is added, for example with this command:

/key bind ctrl-Q /print test

The output should be (note that it's added in lower case):

New key binding (context "default"): ctrl-q => /print test

And when trying to unbind a ctrl key with upper case, the lower case letter should be removed:

/key unbind ctrl-Q

Output:

Key "ctrl-q" unbound (context: "default")

Upgrading from old version

The upgrade of keys to the new format (lower case) is completely transparent for the user.

When upgrading WeeChat (either with /upgrade) or starting it with old config files, the ctrl-X keys (in upper case) are automatically converted to ctrl-x (lower case).
The keys are converted to lower case, either when loaded from weechat.conf or when doing manual /key bind ctrl-X /something.

Be careful, running an old WeeChat version with this new config will not work, as all Ctrl keys will be lower case and WeeChat will not recognize them (so for example an essential key like Enter will not work any more).

Metadata

Metadata

Assignees

Labels

featureNew feature request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions