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

F1 does not work in FAR manager #40

Closed
basinilya opened this issue Oct 1, 2015 · 6 comments
Closed

F1 does not work in FAR manager #40

basinilya opened this issue Oct 1, 2015 · 6 comments
Labels

Comments

@basinilya
Copy link

F1 works in local console, but does not work over putty.
Alt-F1 does not work in both cases

In fact, the example https://msdn.microsoft.com/en-us/library/windows/desktop/ms685035%28v=vs.85%29.aspx shows significant difference for function keys.

@rprichard
Copy link
Owner

It should be easy to synthesize the keyboard events on the Windows side. The difficult part will be figuring out what the terminal escape sequences are. The current event handling in winpty is not thorough.

I can solve that partly by looking up the codes online. To test, I'll need a terminal that lets me type those key combos, which is tricky because the Alt+Fnn keys are already doing desktop/window management things on my computer. Solvable, probably.

@basinilya
Copy link
Author

Connecting with putty to linux and cygwin sshd. Both have LANG=en_US.UTF-8 TERM=xterm .
Launching mc and far accordingly; pressing F1.

pkeyb

@basinilya
Copy link
Author

because the Alt+Fnn keys are already doing desktop/window management things on my computer

All right, it's the reason why it doesn't work in my mintty.
Could you concentrate on Fn keys without alt?

@rprichard
Copy link
Owner

I should be able to add putty's Fnn and Alt+Fnn keys. Here are its escape sequences:

Fnn Alt+Fnn
F1 ^[[11~ ^[^[[11~
F2 ^[[12~ ^[^[[12~
F3 ^[[13~ ^[^[[13~
F4 ^[[14~ ^[^[[14~
F5 ^[[15~ ^[^[[15~
F6 ^[[17~ ^[^[[17~
F7 ^[[18~ ^[^[[18~
F8 ^[[19~ ^[^[[19~
F9 ^[[20~ ^[^[[20~
F10 ^[[21~ ^[^[[21~
F11 ^[[23~ ^[^[[23~
F12 ^[[24~ ^[^[[24~

Also see http://aperiodic.net/phil/archives/Geekery/term-function-keys.html.

@basinilya
Copy link
Author

Have you tried integrating with ncurses?

@rprichard
Copy link
Owner

I haven't looked that closely at ncurses/termcap/terminfo. My inclination so far is that the extra dependency isn't worth it. winpty has use cases that don't involve Cygwin, so there may not be a readily available ncurses/termcap/terminfo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants