Coder Social home page Coder Social logo

Can’t use Alt/Meta about kmscon HOT 8 CLOSED

dvdhrm avatar dvdhrm commented on June 27, 2024
Can’t use Alt/Meta

from kmscon.

Comments (8)

dvdhrm avatar dvdhrm commented on June 27, 2024

Could you elaborate this a bit more? Do you want to use these as --grab-XY= or do they have special bindings in other terminals? Or do you want to use them in SSH as special keys? I'm not following, sorry.

from kmscon.

etam avatar etam commented on June 27, 2024

My use-case: In Midnight Commander there are lots of commands like <Alt>i or <Shift>F3. When I'm trying to use them, it behaves like I was just pressing i or F3.

from kmscon.

dvdhrm avatar dvdhrm commented on June 27, 2024

Indeed, xterm generates '\302\210' on alt+backspace. Hm, I haven't found anything about that in the vt220 specs. I will have a look how these are handled by xterm and Co.

from kmscon.

towolf avatar towolf commented on June 27, 2024

Well for me it’s specific inputrc bindings like

"\e\C-h": backward-kill-word
"\e*": insert-completions
"\e.": yank-last-arg

check bind -p for these ...

from kmscon.

dvdhrm avatar dvdhrm commented on June 27, 2024

Currently the problem is that kmscon ignores the ALT/MOD1 key entirely. That is, the bash doesn't even know whether it was pressed or not.

http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
This tries to explain the ALT/META keys but I haven't quite understood it yet. It doesn't seem to be the behavior my bash shows.

http://www.vt100.net/docs/vt510-rm/chapter8
This also does not mention the ALT key for normal keys.

Hm, sorry that i cannot fix this right away. I will have to look into this again this week. Thanks for the fast responses!
(Or maybe I am really missing something obvious here?)
David

from kmscon.

bluetech avatar bluetech commented on June 27, 2024

I can confirm this, in almost all terminal emulators I know (well except xterm) meta should should send \033 (escape) before the key. xterm has a config for that called metaSendsEscape (see the ctrlseqs file you linked to), and as I said it's the default almost everywhere. A quick test if it works is ALT-b to back a word, and ALT-f to forward a word, which should work in every readline application (e.g. bash).

from kmscon.

bluetech avatar bluetech commented on June 27, 2024

And btw, the mod to use for this is UTERM_MOD1_MASK.

from kmscon.

dvdhrm avatar dvdhrm commented on June 27, 2024

I've pushed a fix to the repository:
8deb82f

Thanks a lot for the fast responses. It still bothers me that XTerm disables altSendsEscape by default and uses the 128-shift instead. However, if the other terminals enable it by default, it is probably the best to do this in kmscon, too. (I also don't see any reason why that 128-shift should be any useful).

If there are any more issues with this, you can reopen it. Thanks!
David

from kmscon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.