forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Simulate keypresses on a lower level

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
lgnr



Joined: 17 Dec 2009
Posts: 39

PostPosted: Mon Jun 28, 2010 7:11 am    Post subject: Simulate keypresses on a lower level Reply with quote

I was wondering if there is a way to simulate inputs on a lower level then the method keydb_event or SendMessage from WinAPI.
I made a really simple UDP client for the PSP and a simple server using winsock and WinAPI to simulate keypresses under windows.
The problem is: the presses are only recognized on almost every windows app, as firefox, notepad etc. and just in some emulators, which comunicate directly using WinAPI.
Most games, unfortunately, seems to get keypresses in a lower level (DirectX would be a good guess, generally).
So my question is not really PSP-related, but.. Is there any way to get data from PSP client to be 'understandable' as keyboard events under those applications?

Many thanks in advance.
Back to top
View user's profile Send private message
lgnr



Joined: 17 Dec 2009
Posts: 39

PostPosted: Mon Jun 28, 2010 12:42 pm    Post subject: Reply with quote

Nevermind, just got it working. SendInput() works just fine.
Except that you HAVE to especify the wScan with the key code (perhaps using MapVirtualKey()) and you HAVE to set dwFlags to KEYEVENTF_SCANCODE.
Not much of a big deal, but it will not work otherwise.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group