dvdhrm / kmscon

Linux KMS/DRM based virtual Console Emulator
http://www.freedesktop.org/wiki/Software/kmscon
Other
433 stars 81 forks source link

support for F13-F20 function keys #29

Closed etam closed 11 years ago

etam commented 11 years ago

Function keys F13 - F20 are under <Shift>F3 - <Shift>F10

Midnight Commander uses them https://github.com/MidnightCommander/mc/blob/master/lib/tty/key.c

dvdhrm commented 11 years ago

I should start using mc just for the sake of trying all the crazy control sequences... Thanks! I will add these keys.

dvdhrm commented 11 years ago

Hm, do you actually know what control-codes they send? I already have vt220-like F13-F20 support but it seems xterm generates different control-sequences for them. That is, xterm uses ^[[18;2~ so it appends ";2" as second argument if shift was pressed (which makes sense), but this differs from ^[[32~ what the vt220 spec says.

So maybe this is really a F7+Shift sequences instead of the F17 sequence that xterm, vte and friends implement. I will follow this style and push a fix this afternoon. If you happen to be around and know which sequences should be sent, please tell me ;)

Thanks David

etam commented 11 years ago

Sorry. I have no idea :(

dvdhrm commented 11 years ago

I have pushed 3602b736ff2a63fde0bc9d3bd46ebc1bd58fc982 to the repository. It should fix this.

Thanks for reporting this! David

etam commented 11 years ago

I'm sorry to tell this, but it's not fixed. It behaves like before.

dvdhrm commented 11 years ago

Can you tell me how to reproduce this and what the expected effects are?

etam commented 11 years ago

I'm running openSUSE 12.2 x86_64. kmscon is build here: https://build.opensuse.org/package/show?package=kmscon&project=home%3AetamPL with all optional dependencies. I launch kmscon by switching to terminal (ctr+alt+f1), logging in as root and running kmscon --font-size 10 --xkb-layout pl -l /bin/login. In one of unused terminals kmscon appears, where I can log in as my local user.

Now with <Shift>F3 I should be able to do this: http://i.imgur.com/PwSad.png But if it doesn't work (or if I just press F3) I do this: http://i.imgur.com/kkGK4.png

dvdhrm commented 11 years ago

Doesn't work for me with xterm or gnome-terminal. Shift+F3 does nothing there. Did you configure something so it works? What terminal are you using?

etam commented 11 years ago

For me works in gnome-terminal, xterm and normal linux console. No additional configuration needed. Also tested: ubuntu 10.04: gnome-terminal, xterm works ok. linux console has F13 under <Shift>F1 (that's weird) ubuntu 12.04: gnome-terminal, xterm works ok. linux console has F13 under <Shift>F1 (that's also weird) fedora 17: gnome-terminal, xterm, linux console works ok.

dvdhrm commented 11 years ago

Ok, please see e1f04b12abc433ec28c263d041687148562f3f5e You use-case works for me now. However, this might be changed in the future. It simply doesn't make sense to send the real F13 to F20 codes when shifted. Instead the second CSI parameter should be adjusted to send held modifiers.

For button remappings like you want you should use xkb config-files instead (which aren't supported yet so I pushed this fix). And beyond all that uninteresting internals, the MC guys should really fix their code to accept the xterm Shift+FX codes.

Anyway, thanks for the bugreport! David