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

mouse input events don't seem to indicate if the event is a drag or not #2814

Open
tstack opened this issue Dec 9, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@tstack
Copy link

tstack commented Dec 9, 2024

It doesn't look like the ncinput structure has a way to indicate if a mouse input event is a drag or not (i.e. the user moves the mouse while holding down a button). The mouse tracking escape sequences add 32 to the button number to indicate a drag, but this seems to be lost in this code:

notcurses/src/lib/in.c

Lines 614 to 625 in 3a3c75e

if(mods % 4 == 3){
tni.id = NCKEY_MOTION;
tni.evtype = NCTYPE_RELEASE;
}else{
if(mods < 64){
tni.id = NCKEY_BUTTON1 + (mods % 4);
}else if(mods >= 64 && mods < 128){
tni.id = NCKEY_BUTTON4 + (mods % 4);
}else if(mods >= 128 && mods < 192){
tni.id = NCKEY_BUTTON8 + (mods % 4);
}
}

Please include the following data:

  • notcurses version (available from notcurses-demo i)

v3.0.11

@tstack tstack added the bug Something isn't working label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant