Skip to content

Add aliases for key bindings #1238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ek4 opened this issue Aug 22, 2018 · 5 comments
Closed

Add aliases for key bindings #1238

ek4 opened this issue Aug 22, 2018 · 5 comments
Assignees
Labels
feature New feature request
Milestone

Comments

@ek4
Copy link

ek4 commented Aug 22, 2018

Feature description

Add aliases for key bindings, for example F5 on meta2-15~ and meta2-[E, so that the key F5 can be used directly in a key binding: /key bind F5 /some_command.

@ek4 ek4 changed the title the names for keys used are undocumented the names of keys are undocumented Aug 22, 2018
@weechatter
Copy link
Contributor

All the weird codes are the peculiarity of terminal key handling. There is no magic mapping of all
the keys things, because WeeChat just uses whatever the terminal tells it.
Therefore you have the alt+k mode, see /help key

@flashcode flashcode added invalid Invalid issue question General question labels Aug 30, 2018
@arza-zara
Copy link
Contributor

I think this is a viable suggestion, not invalid. For example we could have aliases like F1 -> meta2-11~ & meta-OP.

@flashcode flashcode reopened this Sep 2, 2018
@flashcode flashcode added feature New feature request and removed invalid Invalid issue question General question labels Sep 2, 2018
@flashcode flashcode changed the title the names of keys are undocumented Add aliases for key bindings Sep 2, 2018
@flashcode flashcode self-assigned this Feb 11, 2023
@flashcode
Copy link
Member

flashcode commented Feb 11, 2023

Hi @ek4,

I'm writing a specification that addresses this issue (but not only): https://specs.weechat.org/specs/2023-002-key-bindings-improvements.html

This is still a draft and not complete, but your feedback is welcome on the proposed changes.

Note: to be consistent, all new key names (aliases) are lower case, that means meta2-15~ (and meta2-[E) become f5 (lower case) and alt+k will return f5.

@flashcode
Copy link
Member

flashcode commented Feb 15, 2023

Hi,

For your information I pushed the branch key-bindings-improvements (work in progress):

  • add of /debug key that displays the new key name using alias (eg: meta2-1;3D is now meta-left)
  • configuration is unchanged for now: it is fully compatible with master branch, keys are not yet renamed in config.

Please try with many terminals and different keys to ensure all keys are properly converted to the new name.
If not, please ping me.

@flashcode flashcode added the in progress Someone is working on this issue label Mar 12, 2023
@flashcode flashcode added this to the 3.9 milestone Mar 12, 2023
@flashcode
Copy link
Member

All changes are implemented on the branch.

As there are many breaking changes, please send feedback before it's merged and available for all testers of development version.

@flashcode flashcode removed the in progress Someone is working on this issue label May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request
Projects
None yet
Development

No branches or pull requests

4 participants