Closed Disonantemus closed 5 months ago
Hi @Disonantemus - thanks for reporting issues with detailed information and suggesting improvements!
Can I check a few things:
What keyboard layout (or locale) you're using?
Does Alt-c
/ Alt-x
with no message selected work if you have some text in the input field?
If you have time, could you help to check the callstack of the crash? Obtaining the callstack is described in https://github.com/d99kris/nchat/blob/master/DEBUGGING.md#core-dumps---linux but essentially you'd run coredumpctl list nchat
to find the PID of the crash core dump, then use coredumpctl debug PID
to start gdb and get the callstack(s) using: thread apply all bt
Generally speaking the Alt
-shortcuts implementation is currently a little hacky in nchat, using hardcoded default key codes, only tested on US
and SE
keyboard layouts (on Mac and Linux). I have yet to find a proper way to handle Alt
-shortcuts with ncurses
.
Note for myself: In the Telegram nchat users group another user reported issues with Alt-d
, Alt-Del
, Alt-Left
and Alt-Right
using Spanish keyboard layout under Droidian. Have yet to check if this is a more general issue for Spanish/other non-US keyboard layouts.
Hi again - with the above commit I've improved the documentation based on the suggestions and updated cut behavior with a selected message (thanks again!).
For the default alt/opt nchat keybindings, one needs to configure the terminal with meta to send escape. I've added a brief FAQ section for it.
I'll close this issue for now, as I cannot reproduce the other issues/crashes reported (tested the terminals mentioned). Feel free to re-open this issue if/when you can help provide more details on the crashes (see my above comment regarding obtaining the callstack of the crash).
For the default key.conf I will leave it as-is for now, it's generated on run-time based on whether it's Linux or macOS, so I'm not sure how to better document it in the README. If you have some suggestion, feel free to share.
Btw, If you like to try "Meta Sends Escape" in xterm (without configuring) you can ctrl left-mouse click in xterm and select it from the context menu (see attached screenshot).
I use Arch, and kitty terminal, and my nchat --keydump
shows different keys for alt-left and alt-right: \4001056
and \4001075
respectively. I use these for word navigation
Description: In README.md says:
Every time you press any of both key combinations, you get a rectangle (like a missing font) and nothing else, not doing the function that says (move cursor backward|forward one word).
How to reproduce it: Launch nchat, write some words in text input and then try
Alt-Left
orAlt-Right
.Workaround I did use
nchat --keydump
to get correct key codes forAlt-Left
andAlt-Right
, and change~/.nchat/key.conf
from:To:
Now works as expected. I still don't know what was the problem in the 1st place.
Environment:
nchat crashes
If you press
Alt-c
orAlt-x
, with an empty text input and not selecting any previous message, nchat crashes. Output:If you send a file (like an image) and immediately try to edit that message you get:
Whatsapp web and Android does not allow to edit a message with only an image; you can send an image with a message, and edit that message, but not remove the whole message. Maybe happens the same with other attachments.
Extra: Suggested corrections to
README.md
, those lines are not clearShould be something more descriptive, but the following is too long (maybe say that all copy/cut/paste operations are related to system clipboard):
Alt-x
doesn't makes sense when a message is selected, because don't cut anything, is exactly the same asAlt-c
(copy). Maybe is better that don't copy selected message.Ctrl-x
did not work for me in the beginning. I tried to do the same process as WA-web or mobile app:select message > press reply button > write reply > press send button
. Took me a while to understand, that nchat is different: you need towrite reply & select message (in any order) > send reply (Ctrl-x)
. Because of this, I did add "send" to description, to make clear that is the last step.README.md In
~/.nchat/key.conf
section should show default content, they aren't, mine has a lot of different values like this:Maybe this was changed in my system or now default values are different.