Coder Social home page Coder Social logo

Comments (4)

pcottle avatar pcottle commented on April 19, 2024

From looking around the web, it looks like curses cant determine if modifier keys are set:
http://stackoverflow.com/questions/4684739/how-to-get-shiftx-altx-keys-in-curses/9775675#9775675
http://stackoverflow.com/questions/9061111/ncurses-with-arrow-keys-plus-modifiers

Since they aren't event sent to the terminal :-/ otherwise id love to add this and add other support for all sorts of modifiers

(seems there is some third party library that attempts to do this but im hesitant to pull it in)

from pathpicker.

pcottle avatar pcottle commented on April 19, 2024

(wish we had a cantfix label, was looking for that one)

from pathpicker.

mstorus avatar mstorus commented on April 19, 2024

Would it be sufficient to listen for the Shift Out and Data Link Escape control codes?
Even if you can't tell if a modifier key was set, pressing Ctrl-n and Ctrl-p seem to produce those control codes, respectively. (codes 14 and 16 http://en.wikipedia.org/wiki/ASCII#ASCII_control_characters)

I'm not very familiar with curses, so I don't know how portable this solution is.

from pathpicker.

pcottle avatar pcottle commented on April 19, 2024

yeah i dont think its an issue with what the control codes are, but rather the fact that the terminal / curses doesnt receive them at all. only exceptions are situations like tmux which gets all the keypresses, but then tmux doesnt pipe them into the running terminal :P

if you can get a working version in curses then id be down to implement (and we should update all those stack overflow answers haha) but keeping this closed for now

from pathpicker.

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.