BBC BASIC for Windows
« Control of Mouse & Keyboard »
Welcome Guest. Please Login or Register. Apr 5th, 2018, 10:15pm
ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018. Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.
If you require a dump of the post on your message board, please come to the support board and request it.
Control of Mouse & Keyboard
« Thread started on: Aug 14th, 2014, 06:49am »
I am working on a project to control Mouse and Keyboard inputs (including Mouse X% & Y%) for people with disability who cannot use their hands. Thus I would like to be able to gain input focus for mouse and keyboard in other programmes, such as MS Word.
What I want to do then is to send a Mouse Click to the buffer so that the PC interprets it as if coming from Mouse when in fact it comes from BBC Basic. I would use the "MOUSE TO" command to locate the pointer position. I want to then also be able to insert text (if needed) at the point of Mouse input focus, again with the PC interpreting input as from the Keyboard rather than from a BBC basic.
I already have some code that controls MOUSE X% and Y% by eye movements but it is the I/O operations that I am struggling with.
Any suggestions welcome!
thanks
Kipper
Logged
rtr Guest
Re: Control of Mouse & Keyboard
« Reply #1 on: Aug 14th, 2014, 09:33am »
What I want to do then is to send a Mouse Click to the buffer so that the PC interprets it as if coming from Mouse when in fact it comes from BBC Basic.
You should be able to adapt the code for faking keyboard input so that it fakes mouse input instead:
You will need to change the SYS "keybd_event" call to SYS "mouse_event" and modify the parameters to correspond with what Windows needs as documented here: