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 #72

Merged
merged 6 commits into from
Feb 25, 2024
Merged

Mouse #72

merged 6 commits into from
Feb 25, 2024

Conversation

Amjad50
Copy link
Owner

@Amjad50 Amjad50 commented Feb 24, 2024

Summary

Added mouse kernel driver, and /devices/mouse for userspace programs.
Now we get mouse events.

Weird issue

So, I'm developing in qemu with 2 monitors.

For some reason, when the qemu window in the second monitor, the "move" events aren't generated from the mouse.
So I have to always use the first monitor.

Not sure what that this about, I'll see if this is a bug and report/fix it maybe.

Related issue

Fixes #48

Changes

  • Added mouse driver in the kernel
  • Added /devices/mouse virtual device for userspace access
  • Added a small debug program in userspace that uses the above to print the mouse events

Checklist

  • The changes are tested and works as expected (mention if not)
  • Documentation
  • Needed README changes

Since the mouse and keyboard both rely on the same PS2 interface, they
are written together.
Now, we can access this the same way we access the keyboard.

We will have to modify the userspace library to support mouse events as
well
This is so that we can add other structs, such as `Mouse` easily. As
this is not only for keyboards.
This is very similar to the keyboard reader
Similar to the keyboard tool, just prints the mouse events.
@Amjad50 Amjad50 enabled auto-merge February 25, 2024 06:36
@Amjad50 Amjad50 self-assigned this Feb 25, 2024
@Amjad50 Amjad50 added user user mode related work io I/O related work devices Hardware devices and drivers labels Feb 25, 2024
@Amjad50 Amjad50 merged commit a340fda into master Feb 25, 2024
2 checks passed
@Amjad50 Amjad50 deleted the mouse branch February 25, 2024 06:39
@Amjad50 Amjad50 added the kernel Kernel related work label Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devices Hardware devices and drivers io I/O related work kernel Kernel related work user user mode related work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add mouse
1 participant