Skip to content
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

Binding keys F10 to F20 display a warning about raw code or invalid key #2039

Closed
flashcode opened this issue Nov 4, 2023 · 0 comments
Closed
Assignees
Labels
bug Unexpected problem or unintended behavior
Milestone

Comments

@flashcode
Copy link
Member

flashcode commented Nov 4, 2023

Bug summary

When trying to bind keys F10 to F20 (with or without a modifier), for example shift-f11, WeeChat displays a warning saying it could be a raw code or invalid key, although it's a perfectly valid key.

Steps to reproduce

1. Issue this command: /key bind shift-f11 /bar scroll nicklist * -100%

Current behavior

Warning displayed:

=!= | Warning: key "shift-f11" seems either a raw code or invalid, it may not work (see /help key)

But the key is added and works fine.

Expected behavior

Key added with no warning displayed.

Suggested solutions

Fix the order of aliases in list gui_key_alias_list to use first F10 to F20, then F0 to F9, so that longer aliases are found first when looping on this list (in src/gui/gui-key.c).

Additional information

Bug affects all versions >= 4.0.0.


  • WeeChat version: 4.2.0-dev (git: v4.1.0-70-gd96a3e6b5)
  • OS, distribution and version: Debian Unstable
  • Terminal: N/A
  • Terminal multiplexer (screen/tmux/…/none): N/A
@flashcode flashcode added the bug Unexpected problem or unintended behavior label Nov 4, 2023
@flashcode flashcode added this to the 4.0.7 milestone Nov 4, 2023
@flashcode flashcode self-assigned this Nov 4, 2023
@flashcode flashcode changed the title Binding key shift-f11 displays a warning about raw code or invalid key Binding keys F10 to F20 display a warning about raw code or invalid key Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant