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.

AppGameKit Studio Chat / Remote keyboard (from Android to Windows)

Author
Message
XANAX 2B
20
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 29th Nov 2022 16:49
Hello,

I would like to program a remote Amiga keyboard in my Android tablet, to send keystate to WinUAE Amiga emulator.
What is the best way ? Is there some examples that can help me ?

If I succed, this will be free, open source, and I'll make other versions for Amstrad CPC.
Emotional High Potential
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 29th Nov 2022 17:43
how "remote" are you talking?

if you didn't know, Games Pack 1 (and 2) is now FREE. inside there is code for "wi-fi mouse and keyboard" that might get you going.

not sure how you'd get from the Host's AppGameKit project to the emulator tho (and please don't post details publicly about how to "hi-jack" an app) but i assume it's possible
XANAX 2B
20
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 29th Nov 2022 18:11
Thank you, Virtual Nomad !

This wi-fi mouse and keyboard source will help me.

I've also found a very short c++ source code that is able to send keystroke to a window. May be I can make a little plugin in c++ ?
Emotional High Potential
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 30th Nov 2022 10:24
Quote: "May be I can make a little plugin in c++ ?"


you can indeed, look at SetCursorPos and keybd_event, your keyboard app would need to send custom network commands to an intermediate app hosted on the same system as the emulator and forward the input either to the emulator or the system using the commands mentioned

but.... I see issues with this approach

does an agk app still receive network commands if it does not have focus ? you might have to use tier2 and install it as a windows service or code a small service app to act as a bridge for the 2 apps

is your emulator made with agk or 3rd party?
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
XANAX 2B
20
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 30th Nov 2022 19:53 Edited at: 30th Nov 2022 20:18
i've used keybd_event like this in my dll, but I can't get it work under AgkS.
I get the message 'Failed to load "" function from plugin "KSPlugin"'.





About focus, i have to check. EDIT: No problems, AgkS continue working when in the taskbar.
Emotional High Potential
XANAX 2B
20
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 30th Nov 2022 20:30 Edited at: 30th Nov 2022 20:31
I'm not so far... (code source added to this post)
Emotional High Potential

Attachments

Login to view attachments
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 30th Nov 2022 20:40
Quote: "please don't post details publicly about how to "hi-jack" an app"

you guys are making me nervous... please go private with the detailed stuff?
XANAX 2B
20
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 30th Nov 2022 21:25 Edited at: 30th Nov 2022 21:31
(yes!) This is a partially working version. Just broad cast the remote to an Android tablet, and run the receiver under Windows. Launch WinUAE, push letter keys, it works.
Emotional High Potential

Attachments

Login to view attachments
XANAX 2B
20
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 30th Nov 2022 21:58 Edited at: 30th Nov 2022 22:02
Is it possible to make a wifi TCP lan connexion with 127.0.0.1 IP ? Using this or even the address given by GetNetworkIP fails, when trying to connect Android to Windows 11.
Emotional High Potential
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 30th Nov 2022 22:20 Edited at: 30th Nov 2022 22:20
Try this

Attachments

Login to view attachments
XANAX 2B
20
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 30th Nov 2022 23:16 Edited at: 30th Nov 2022 23:16
Thanks a lot blink0k ! Now, it works a lot better.
Emotional High Potential

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-03-29 11:31:40
Your offset time is: 2024-03-29 11:31:40