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

Linux/x11 input handling #7811

Merged
merged 5 commits into from
Feb 15, 2024
Merged

Linux/x11 input handling #7811

merged 5 commits into from
Feb 15, 2024

Conversation

kvark
Copy link
Contributor

@kvark kvark commented Feb 15, 2024

Implements the basics of keyboard and mouse handling.
Some keys will need special treatment, like Backspace/Delete. In this PR, all keys are treated as append-only. Leaving this for a follow-up.

I used @gabydd 's branch as a reference (thank you!) as well as https://github.com/xkbcommon/libxkbcommon/blob/master/doc/quick-guide.md
For future work, I'll also use https://github.com/xkbcommon/libxkbcommon/blob/master/tools/interactive-x11.c

All commits are separately compileable and reviewable.

Release Notes:

  • N/A

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 15, 2024
@Titaniumtown
Copy link

Titaniumtown commented Feb 15, 2024

I can confirm this PR works under XWayland on kde 6.0-rc2. Forcing it to use x11 (with the WAYLAND_DISPLAY='' environment variable) allows keyboard/mouse input. One thing though is that ctrl+a results in the text not being selected and invalid characters being created.
image

Just wanted to note the results of my testing it's behavior. Great work!

Comment on lines +160 to +164
| x::EventMask::BUTTON1_MOTION
| x::EventMask::BUTTON2_MOTION
| x::EventMask::BUTTON3_MOTION
| x::EventMask::BUTTON4_MOTION
| x::EventMask::BUTTON5_MOTION

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may be uneducated, but what are these button1-5? If this is not commonplace knowledge maybe comments should be added to describe what each maps to

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mouse pointer motion while mouse button 1-5 is down.

@Titaniumtown Titaniumtown mentioned this pull request Feb 15, 2024
15 tasks
@mikayla-maki mikayla-maki self-assigned this Feb 15, 2024
@mikayla-maki mikayla-maki merged commit a41fb29 into zed-industries:main Feb 15, 2024
6 checks passed
@kvark kvark mentioned this pull request Feb 16, 2024
@kvark kvark deleted the x11-input branch February 16, 2024 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants