Sébastien Helleu
111525792d
core: use a fixed size buffer to rename a bar
2023-03-19 16:47:46 +01:00
Sébastien Helleu
34e34d28db
core: bump version to 4.0.0-dev, follow "practical" semantic versioning
2023-03-18 15:59:23 +01:00
Sébastien Helleu
99ca276556
core: also display mouse codes with /debug key
2023-03-17 22:49:50 +01:00
Sébastien Helleu
64a553f91f
core: change order of modifiers in mouse keys
...
Now the modifiers for mouse keys are in the same order as other keys: `alt-`
then `ctrl-`.
2023-03-17 19:18:30 +01:00
Sébastien Helleu
3640d187b8
core: split gui-curses.h into multiple headers
2023-03-17 18:52:30 +01:00
Sébastien Helleu
313b40235a
core: fix search of commands with raw code and alias matching
...
When raw code and alias for a key are both matching, the raw code must always
have higher priority.
This commit fixes this behavior and gives priority to raw code.
2023-03-17 18:52:30 +01:00
Sébastien Helleu
fe6b69c41c
core: set insert_ok to 0 for backspace key
2023-03-17 18:52:30 +01:00
Sébastien Helleu
e060a0e7f2
core: remove "%s" from translated message for key debug
2023-03-17 18:52:30 +01:00
Sébastien Helleu
c1db5c9549
core: refactor print of keys in debug mode
...
Changes:
- add function gui_key_debug_print_key
- change message "no key" by "no key binding"
- remove messages ""insert into input" / "ignored"
- add color for delimiters
2023-03-17 18:52:30 +01:00
Sébastien Helleu
a54663d60c
core: replace "\x01" by "^" and add color for delimiters in output of /debug key
2023-03-17 18:52:30 +01:00
Sébastien Helleu
9afbf02a42
core: use order returned by gui_key_expand in gui_key_modifier_list
2023-03-17 18:52:30 +01:00
Sébastien Helleu
0c4a5528ac
core: display a warning when trying to bind a raw key code or invalid key (missing comma)
2023-03-17 18:52:30 +01:00
Sébastien Helleu
3b8f9d4547
core: check new keys manually added with /set
2023-03-17 18:52:30 +01:00
Sébastien Helleu
042968b016
core: remove use of "meta2-" in key name
...
The raw key code is kept as-is, so for example "meta2-A" becomes "meta-[A".
2023-03-17 18:52:30 +01:00
Sébastien Helleu
bf51a081d9
core: display a specific error when trying to bind a key without area in mouse context
2023-03-16 20:42:19 +01:00
Sébastien Helleu
bb0c7b39fe
api: change also default value of new key options with function key_bind
2023-03-16 20:42:19 +01:00
Sébastien Helleu
d94979fe3e
core: split alias list into two lists
2023-03-16 20:42:19 +01:00
Sébastien Helleu
7f1f6a6e84
tests: add extra test on function gui_key_legacy_to_alias
2023-03-16 20:42:19 +01:00
Sébastien Helleu
a686fa6407
api: change default value of existing key options with function key_bind
...
With this fix, fset buffer shows the key as modified only if the user actually
changed the command bound to the key.
2023-03-16 20:42:19 +01:00
Sébastien Helleu
ccc649d06c
core: create config options for all keys that can be managed with /set and /fset commands
2023-03-16 20:42:19 +01:00
Sébastien Helleu
c82df8f22e
core: fix safe list of keys
...
Add missing safe keys: "backspace" and "return".
Add missing unsafe keys: "comma", "space".
2023-03-16 20:42:19 +01:00
Sébastien Helleu
c647d540a7
core: remove obsolete function gui_key_legacy_expand
2023-03-16 20:42:19 +01:00
Sébastien Helleu
d1adec29f9
core: optimize search of key by reducing the number of splits into chunks
2023-03-16 20:42:19 +01:00
Sébastien Helleu
5b5c9afa29
core: add key alt-K (alt+shift+k) to grab raw key and its command
2023-03-16 20:42:19 +01:00
Sébastien Helleu
1f5c791c37
core: use new key name in command /key and configuration file
...
Legacy keys are automatically converted to new names when loading configuration
file `weechat.conf`.
Examples:
"ctrl-I" => "tab"
"meta2-1;3A" => "meta-up"
"meta2-Z" => "shift-tab"
"meta-wmeta-meta2-A" => "meta-w,meta-up"
"ctrl-Cb" => "ctrl-c,b"
2023-03-16 20:42:19 +01:00
Sébastien Helleu
31bf962bba
core: display new key name using aliases in output of /key command
2023-03-16 20:42:18 +01:00
Sébastien Helleu
15587ac72f
core: fix function gui_key_legacy_to_alias with keys on areas
2023-03-16 20:42:18 +01:00
Sébastien Helleu
21910b7050
core: add function to expand raw key code to name with alias, use it in /key debug
2023-03-16 20:42:18 +01:00
Sébastien Helleu
0781f29726
core: add keyboard debug mode with command /key debug
2023-03-16 20:42:18 +01:00
Sébastien Helleu
fb0248f557
core: fix crash in case of NULL message sent to function gui_chat_printf_y_date_tags ( closes #1883 )
2023-02-22 20:38:56 +01:00
Robin Jarry
9b9ec62a8e
core: allow /input move_next_word going to the end of line
...
When the input buffer contains non word characters at the end, /input
move_next_word will stop moving at the end of the last word. This is
a bit confusing and not in line with what readline does (think bash).
When there are no words left in the input buffer, make /input
move_next_word go to the end of line.
Signed-off-by: Robin Jarry <robin@jarry.cc >
2023-02-10 18:56:43 +01:00
rj1
69a3dd21dc
fix: various code comments
2023-02-04 11:50:44 +01:00
Sébastien Helleu
6d4471b6db
core: optimize search of key bindings in contexts default/search/cursor
2023-02-04 10:45:57 +01:00
Sébastien Helleu
587e2882ac
core: simplify function gui_key_cmp
2023-02-03 22:52:07 +01:00
Sébastien Helleu
68a5a71b55
core: remove extra spaces before comma
2023-02-02 22:01:46 +01:00
Sébastien Helleu
fd746a04d6
core: force ctrl keys to lower case when they are added ( closes #1875 )
2023-01-29 12:41:28 +01:00
Sébastien Helleu
be0c04f498
core: ignore incomplete ctrl/meta/meta2 codes in keys (issue #1875 )
2023-01-29 12:41:27 +01:00
Sébastien Helleu
c68c2aaa94
core: ensure internal_code is not NULL when adding a default key (issue #1875 )
2023-01-29 12:41:26 +01:00
Sébastien Helleu
3005658f38
core: compute first internal code and expanded name before removing key (issue #1875 )
2023-01-29 12:41:24 +01:00
Sébastien Helleu
a9289cbdc1
core: compute first internal code and expanded name before adding key (issue #1875 )
2023-01-29 12:41:23 +01:00
Sébastien Helleu
0d8a6679b3
core: use dynamic string in functions gui_key_get_internal_code and gui_key_get_expanded_name (issue #1875 )
2023-01-29 12:41:22 +01:00
Sébastien Helleu
48c1aebb83
tests: add tests on gui key functions (issue #1875 )
2023-01-29 12:41:11 +01:00
Sébastien Helleu
3e9e1b51bf
core, plugins: replace calls to strcmp by string_strcmp when difference matters (issue #1872 )
2023-01-28 15:14:26 +01:00
Sébastien Helleu
fbeab26a35
core, plugins: replace calls to string_str(n)cmp by str(n)cmp (issue #1872 )
2023-01-28 15:14:24 +01:00
Sébastien Helleu
c07cf691ad
core, plugins: check that string parameters are not NULL in search functions (issue #1872 )
2023-01-28 15:14:22 +01:00
Sébastien Helleu
d7f08a45d7
core: make notify tags in line case sensitive (issue #1872 )
2023-01-28 15:14:14 +01:00
Sébastien Helleu
844b57a26d
core: make key contexts case sensitive (issue #1872 )
2023-01-28 15:14:12 +01:00
Sébastien Helleu
f11d598928
core: make hotlist priorities case sensitive (issue #1872 )
2023-01-28 15:14:11 +01:00
Sébastien Helleu
8744fdfaf3
core: make filter names case sensitive (issue #1872 )
2023-01-28 15:14:10 +01:00
Sébastien Helleu
7a8ce6c9ae
core: make color names and attributes case sensitive (issue #1872 )
2023-01-28 15:14:08 +01:00