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

Support move movement. #794

Merged
merged 1 commit into from
Dec 17, 2023
Merged

Support move movement. #794

merged 1 commit into from
Dec 17, 2023

Conversation

ArthurSonzogni
Copy link
Owner

  • Record whether the mouse moved. Suppress the previous alternative implementation.
  • Record mouse.control modifier.

Fixed:#791

@ArthurSonzogni
Copy link
Owner Author

Hello @psychon,
Could you please take a look? Does this improve the situation?

@psychon
Copy link

psychon commented Dec 17, 2023

Does this improve the situation?

TL;DR: Yup, it does. I can't spot anything really wrong that can be fixed in ftxui.

Let's look at ftxui_example_print_key_press again:

  • Open a new urxvt instance, run this, move the mouse around reports things like mouse_none_pressed_control_shift_meta(95,24); this is a bug in urxvt that I found yesterday and I am still trying to report upstream (urxvt's code reports "button -1 was last pressed" and that messes up everything)
  • After any mouse press, things become mouse_left_moved(61, 6) or mouse_right_moved(63, 5) or something like that (same for middle button and wheels)
  • Click-and-drag produces stuff like
    • mouse_left_pressed(...)
    • mouse_left_moved(...)
    • mouse_left_moved(...)
    • mouse_left_released(...)
  • Ctrl + mouse click moves fine, e.g. mouse_left_pressed_control
  • Alt + mouse click moves fine, e.g. mouse_left_pressed_meta
  • Ctrl + Alt + mouse clicks works, too
  • Shift + mouse click selects words and is not detected

Basically the same behaviour with xterm, except:

  • Things work fine even before the first mouse click
  • Moves already report pressed modifiers (with urxvt I always get the modifiers active at the time of the last mouse click)
  • Ctrl + click is caught by xterm and not reported

The dropdown example works fine.

I'm out of other ideas to try.

@ArthurSonzogni
Copy link
Owner Author

Thank you very much!

@psychon
Copy link

psychon commented Dec 17, 2023

Thank you for fixing this so quickly

@ArthurSonzogni ArthurSonzogni merged commit a7b6785 into main Dec 17, 2023
6 checks passed
@ArthurSonzogni ArthurSonzogni deleted the fix-urxvt branch December 17, 2023 09:35
ArthurSonzogni added a commit that referenced this pull request Dec 26, 2024
ArthurSonzogni added a commit that referenced this pull request Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants