Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7909479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:26:09+00:00 2026-06-03T12:26:09+00:00

Is there a Mouse equivalent class for KeyStroke? I’m looking for some kind of

  • 0

Is there a Mouse equivalent class for KeyStroke? I’m looking for some kind of wrapper around a a MouseEvent to describe which button was pushed (I can get this through SwingUtilities), and any modifiers used as well. The idea is I’m already catch AWT mouse events through a listener, but then taking that event and processing it for 3D picking in a virtual world. I’d like to try and map mouse bindings in such a way (similar to InputMap and ActionMap with swing controls). KeyStroke has been a god-send, anyone know of a MouseStroke or similar?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T12:26:15+00:00Added an answer on June 3, 2026 at 12:26 pm

    A “mouse” is traditionally defined as having a maximum of three buttons. That is also what Java supports by MouseEvent.getButton().

    More advanced mice with multiple buttons are usually installed as multiple HID devices. Meaning they install two drivers, for a mouse AND for a keyboard. For these mice, you can set what other buttons mean, and usually it’s something like a key press (for example, shift) or double click. Those are events that Java can catch, either as MouseEvent of KeyEvent.

    More advanced functionality, such as “Open an application” or “change DPI”, is implemented in the driver. Being device-specific, there is nothing Java can do to catch those events (you would have to write your own native listener for these events, provided the driver support that).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is there any way I can detect mouse position/button states without working with events
i have list of images and on mouse over there is option box shows
Is there a way to get the location mouse inside a <canvas> tag? I
Is there a way to register for global mouse moved events in Cocoa? I
Is there any way to determine if the mouse scrolls up or down using
Is there any way to get mouse position relative to it's parent element? Let's
Is there a way to use a mouse click and drag in wpf? I
Is there a way to display the dropdown menu shown on sitepoint by mouse
is there a way, in Java, to directly check whether one of the mouse
I have seen some websites with a custom mouse pointers rather than the normal

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.