lhmouse / nano-win

GNU nano text editor for Windows [WARNING: The master branch is constantly rebased and force-pushed so don't expect it to be steady!! -end WARNING]
https://files.lhmouse.com/nano-win/
GNU General Public License v3.0
210 stars 25 forks source link

Key mappings #45

Open lm8 opened 1 year ago

lm8 commented 1 year ago

I downloaded nano-win_10050_v6.4-11-gca57881b7.7z to try it out. Some of the key mappings to commands don't seem to be working. For instance, I can't get ctrl-/ Go to Line to do anything. Also noticed when I call up the help and use the page up key, it fails. Works okay outside of help. When I try nano on a Linux system, page up works as expected at the help screen.

I have my own build of nano from the original source that uses pdcurses in place of ncurses. It's having similar problems with certain key commands and mouse actions. I'm investigating patching parts of the issue now. Thought I had the mouse working at one point, but think it only works properly with pdcurses and the SDL backend. It works intermittently with pdcurses in Win32 console mode. UTF-8 mode might work partially with pdcurses and SDL backend since there's support for drawing UTF-8 characters with SDL2. Native language support works on my version, but you have to set the environment variable for LANG to change the language. It looks for languages files in a location relative to the executable rather than hard-coding a location.

You did a really nice job porting nano and maintaining it with the latest nano updates. There's a lot of work involved in it especially after updates.

lhmouse commented 1 year ago

nano uses wgetch() to read console inputs so you may try checking what it returns. This requires a little knowledge about curses libraries.

lm8 commented 1 year ago

Working on checking what wgetch returns now. There's also a nice testcurs program that comes with pdcurses that can show what keys are pressed and what codes are returned for those keys.

lhmouse commented 1 year ago

You may try the legacy console. In legacy console on my Windows 10 machine, both Page Up and Page Down work on help page. However Ctrl-/ still does not work, without a response.

This is not the only issue about the 'new' console. GDB in TUI mode crashes in the new console, blowing up the entire window with all processes in it.

lm8 commented 1 year ago

Thanks for the information.