Mouse support
basic4ever
Posts: 9
Dear sir
Is there some DOC that explains step by step how to add a mouse in my VGA propeller project ?
I want only add a cursor , move it, using the Mouse, and when i click, returns the x,y position.
It´s must to be easy to add you my project!
Thanks a lot!
Miguel
Is there some DOC that explains step by step how to add a mouse in my VGA propeller project ?
I want only add a cursor , move it, using the Mouse, and when i click, returns the x,y position.
It´s must to be easy to add you my project!
Thanks a lot!
Miguel
Comments
http://obex.parallax.com/objects/60/
Also, the Propeller Demo Board schematic shows the kind of wiring you would need for the mouse.
http://www.parallax.com/Portals/0/Downloads/docs/prod/prop/PropellerDemoBd-RevG-Schem.pdf
But, how do i use this routine to SHOW the cursor, move it and detect the position ?
Miguel
Thank for answer!
May you help to put the MOUSE in following project
http://n8vem-sbc.pbworks.com/w/page/4200926/Propeller-VT100-Compatible-Terminal
It must to heva 2 "cursors"...one for mouse and one where will be printed a text...
When you move the cursor mouse, no move for text cursor...they are independend...one not see the other...may you help ?
I want that a click returns the cursor mouse position only....
Miguel
Miguel,
It's not clear to me what you're trying to do. I'm just going to guess what you're trying to do, so here goes:
You want a cursor that moves around on your screen when you move your mouse.
But sometimes you want to move the mouse to a data entry box, and then when you click the mouse on that data entry box, you can then enter text with a keyboard.
Is that what you're after?
yes. And when i click the mouse button, i want get the x,y position of cursor mouse.
No, i am always reading the keyboard, full time. I dont need a entry box, the entry box will be implemented by my microcontroller....my microcontroller will monitor size of text, back spacing, hidden it, cursor position...i will control the position of cursor text...
I hope that you understand!
Thanks for you help!
Miguel
Miguel,
normally I never post any code because writing code is something I'm very bad at, but I've cut and pasted below some stuff that I often use for dealing with mouses and cursors. This is NOT a fully functional program, just some methods and snippets of code that I hope will give you some idea of how to do things in SPIN. Mind you, I'm bad at programming, so I'm sure there are much better ways to do things, but since nobody else has come to your rescue, I hope this helps you rather than causes more problems for you than it's worth. Look over it, try to follow how the different methods are called and what they do, and maybe from this you can cobble together your own system exactly as you need it.
Note: to get the code block colors, etc. it's best to cut and then paste this into your own SPIN editor.
best of luck!