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 support without needing changes to the mmbasic source #2

Open
robert-rozee opened this issue Jan 13, 2024 · 0 comments
Open

mouse support without needing changes to the mmbasic source #2

robert-rozee opened this issue Jan 13, 2024 · 0 comments
Assignees

Comments

@robert-rozee
Copy link

robert-rozee commented Jan 13, 2024

i have a tentative idea for mouse support without needing to make any changes to the PicoMite VGA source code:

  1. have mouse wheel up/down rotation permanently translate to the up/down arrow keys:
    VK_UP: escape+"[A"
    VK_DOWN: escape+"[B"

(addendum: ctrl-E and ctrl-X may be better choices for mouse wheel rotation, that way a running mmbasic program can distinguish between mouse movement and wheel rotation. within the editor, ctrl-E and ctrl-X are alternatives to arrow up and arrow down for use with a dumb terminal that lacks arrow keys)

  1. have two key combinations to enable and disable mouse reporting: alt-M turns it on, alt-N turns it off. an alternative would be to hijack the use of scroll-lock, but this key may be missing from some compact keyboards. maybe provide for both options?

  2. if mouse reporting is currently turned off, temporarily turn it on while the left or right mouse button is held depressed.

  3. translate mouse movement to arrow key escape sequences when mouse reporting is on as follows:
    VK_UP: escape+"[A"
    VK_DOWN: escape+"[B"
    VK_RIGHT: escape+"[C"
    VK_LEFT: escape+"[D"

some scaling of mouse movement may be needed, and the rate of arrow movements limited to, say, 10 reports per second. this rate could perhaps be adjustable, as could X and Y scaling factors, selected using some alt- key combinations. or just use alt-1 to alt-9 to select between 9 different sets of presets.

as far as i can see, the above should give us:

  • mouse wheel always works in editor to scroll up/down
  • within the editor one can 'drag' the edit cursor using the mouse while holding down one of the mouse buttons
  • within games, there is a means for the user to turn on mouse reporting without need for holding down the mouse button continuously, and thereafter use the mouse instead of the arrow keys.

this is all just an idea to mull over for the moment! does it sound usable?

cheers,
rob :-)

@No0ne No0ne self-assigned this Jan 16, 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

When branches are created from issues, their pull requests are automatically linked.

2 participants