GNU nano - Bugs: bug #64632, handling of the F13 symbol...
You are not allowed to post comments on this tracker with your current authentication level.
bug #64632: handling of the F13 symbol disappeared in 5.0
Submitter: | Danny Milosavljevic <dannym> | ||
Submitted: | Fri 08 Sep 2023 03:43:39 PM UTC | ||
Severity: | 2 - Minor | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Open |
Jump to the original submission
Mon 18 Dec 2023 11:48:01 AM UTC, comment #13: |
Benno Schulenberg <bens> |
Mon 11 Dec 2023 03:54:38 PM UTC, comment #12: Correction: setting `key <CAPS> {[ F2, F1 ]}` and then pressing Shift+Caps, ncurses passes the symbol F13 to nano, because ncurses sees Shift+F1. |
Benno Schulenberg <bens> |
Mon 11 Dec 2023 03:35:15 PM UTC, comment #11: Nano was never able to distinguish between Shift+F1 and F13, so not being able to do that now is not a problem. Also, I do not know of any keyboard that has an actual F13 key, so Shift+F13 should not occur -- and nano would not be able to handle it anyway, because Shift+F13 would translate to F25, and nano handles only up to F24.
|
Benno Schulenberg <bens> |
Mon 11 Dec 2023 01:21:05 PM UTC, comment #10:
|
Egmont Koblinger <egmont> |
Mon 11 Dec 2023 12:29:28 PM UTC, comment #9: Owww. You're right: xterm produces the same codes as VTE for F13 to F35. It never occurred to me to check that. :/ I was convinced that kf13 and beyond in the `infocmp` ouput stood for F13 and beyond. But that was a mistake, as some googling and finding https://invisible-island.net/xterm/terminfo-contents.html made clear. Search for "Shift-Fx" (without the quotes) and find:
So... kf13 does not mean F13 -- it means Shift+F1! And so on for the other function keys beyond F12. Ouch. :/
|
Benno Schulenberg <bens> |
Sun 10 Dec 2023 08:35:44 PM UTC, comment #8: Hi guys,
|
Egmont Koblinger <egmont> |
Sun 10 Dec 2023 12:02:10 PM UTC, comment #7: To summarize: the escape sequences that VTE-based terminals produce for F13 to F35 are the sequences that belong to a Linux console, not to an Xterm. This is incorrect, as VTE-based terminals try to imitate an Xterm as closely as possible, not a Linux console. I will send the attached patch upstream. |
Benno Schulenberg <bens> |
Thu 14 Sep 2023 02:20:28 PM UTC, comment #6: The "^[[25~" comes from libvte. I've edited /usr/lib/x86_64-linux-gnu/libvte-2.91.so.0.6800.0 (with nano --ignore --noconvert --nonewlines --nohelp) and replaced the occurrence of "25~" with "44~" and rebooted. When I then run `setxkbmap nl` (where the nl map contains `replace key <CAPS> {[ F13 ]};`, then typing ^V followed by CapsLock produces a "^[[44~" sequence instead of "^[[25".
|
Benno Schulenberg <bens> |
Mon 11 Sep 2023 07:50:27 PM UTC, comment #5: (Aha, for what it's worth, Shift-F1 on the (no configuration changed) Linux text console is
|
Danny Milosavljevic <dannym> |
Mon 11 Sep 2023 07:31:33 PM UTC, comment #4:
the result is:
|
Danny Milosavljevic <dannym> |
Mon 11 Sep 2023 05:36:05 PM UTC, comment #3: When on an xterm I press Ctlr+V and the actual F13 key (that is: Shift+F1), the produced sequence is: "^[[1;2P" (without the quotes). When I run:
the result is:
So the xterm sequence for F13 is not "^[[25~". Why xkbcomp seems to think so, I don't know. Maybe TERM needs to be set to "xterm" when you invoke xkbcomp? |
Benno Schulenberg <bens> |
Mon 11 Sep 2023 02:14:39 PM UTC, comment #2:
|
Danny Milosavljevic <dannym> |
Sat 09 Sep 2023 07:12:00 AM UTC, comment #1: How do you map CapsLock to F13? Do you mean that you make the CapsLock key emit the escape sequence for F13? On what terminal are you doing that? And what is TERM set to? Because if TERM is set correctly for the terminal, ncurses should recognize the escape sequence for any function key, and in this case should return KEY_F(13) to nano instead of the raw escape sequence. Or are you using --rawsequences? |
Benno Schulenberg <bens> |
Fri 08 Sep 2023 03:43:39 PM UTC, original submission:
Hi,
|
Danny Milosavljevic <dannym> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 7 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2023-12-18 | bens | Status | None | Fixed | |
2023-12-11 | bens | Summary | F13 key handling disappeared a while back | handling of the F13 symbol disappeared in 5.0 | |
2023-12-11 | bens | Status | Invalid | None | |
Assigned to | None | bens | |||
2023-12-10 | bens | Severity | 3 - Normal | 2 - Minor | |
Status | None | Invalid | |||
2023-12-10 | bens | Attached File | - | Added 0001-keymap-use-escape-sequences-from-xterm-instead-of-fr.patch, #55432 |
Powered by Savane 3.13-02a9.
Corresponding source code
Fixed in git, commit 41b52d70, by recognzing the escape sequences for the real F13...F16 symbols again, mapping them to what nano calls F13...F16.