Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Programable keyboard

Author
Message
minus_273c
15
Years of Service
User Offline
Joined: 16th Aug 2010
Location:
Posted: 16th Aug 2010 18:23
I'd welcome some help. I've just bought an 8" USB connected Touch-sensitive monitor, with the intention of using it to create an updated version of the old Saitek game controller.

The original was a PS2 connected programmable keyboard into which you could slide paper overlays. This enabled you to fake up control panels relevant to the game or simulation and program the keys to match commands. It no-longer works and is over-basic anyway.

Obviously the intent is to divide the USB screen into a number of keys (6x4 or 8x5) and link xml defined mappings to similarly named bitmaps or jpegs, and have a minimal program running to translate finger taps to key presses.

I have 2 real questions.

#1. Is it difficult, (using DB Pro), to feed stuff into the keyboard buffer for other apps to use?

#2. Clearly the USB monitor won't have the main program running on it, so how do you arrange for a single tap on the USB screen to grab processing, feed a value (or values) into the main keyboard buffer, then return control to the original process?

Am I being over ambitious with DB Pro, or am I re-inventing the wheel?

Thanks,

CJ


Life is not a zero-sum game.
DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 17th Aug 2010 01:40
Most touch screens simply use mouse co-ordinates so you can just use the mouse input commands. I don't think there is a way to fake the entry buffer in DB, at least not to my knowledge. You could perhaps use the clipboard for whatever purposes you are needing external program support. Are you trying to get a db program to actually work as a controller for another game?

http://s6.bitefight.org/c.php?uid=103081
minus_273c
15
Years of Service
User Offline
Joined: 16th Aug 2010
Location:
Posted: 17th Aug 2010 10:45
I'm trying to use it as a controller for another game. Along the lines of a voice controller package (eg 'Shoot') but for a screen rather than a mike.


Life is not a zero-sum game.
Jeff032
18
Years of Service
User Offline
Joined: 13th Aug 2007
Location:
Posted: 17th Aug 2010 15:16
user32.dll has a function called PostMessage which you could use to send key presses to another program if you have the handle to the window. One of the ways to get the handle is FindWindow which is also in user32.dll. I don't have example code at the current time.

Login to post a reply

Server time is: 2026-07-25 07:37:36
Your offset time is: 2026-07-25 07:37:36