DirectInput keyboard poling question (Resolved) -
I'm writing a game using DirectInput. The game uses full screen 3D animation, so to debug I'm using remote debugging over a network. The only input I'm currently working with is the keyboard, and am having some troubles. DirectInput allows for immediate and buffered input. Buffered input queus input messages from the input device, while immediate is supposed to return the current state of the device. In the case of the keyboard, I pass in the address of an array of 256 char. The array is filled with 0 for unpressed, or -128 for pressed.
When I press a key on the remote system, the array is correctly filled with 0's for all keys except the one pressed, and -128 for the pressed key. The problem is that it stays that way forever. Subsequent calls to get the keyboard state (I think it is GetState, or something like that) show the same key pressed. For instance, if I press A, then the A shows as being pressed. If I then press D, both A and D show as being pressed. This continues forever.
The character array is a local variable in the function that deals with keyboard input, so it has local scope, and is filled with semi-random junk whenever the function is entered. I can see that the polling is working somewhat, since the semi-random junk is replaced by 0's and -128's when the keyboard is polled (using GetState or whatever that function name is). I can also determine that the information it is getting is coming from the remote machine, because the keys correspond to keypresses on that machine. The problem is simply that it is not, in fact, the current state of the keyboard, but a memory of what was pressed for the keyboard.
This is DirectX7.0 by the way.
If anybody can tell me what is going on, or suggest a way around it, I'd sure like to hear it.
DirectInput keyboard poling question (Resolved) -
I'm writing a game using DirectInput. The game uses full screen 3D animation, so to debug I'm using remote debugging over a network. The only input I'm currently working with is the keyboard, and am having some troubles. DirectInput allows for immediate and buffered input. Buffered inp
[VB] DirectInput Question -
Hello, i want to know if it's possible to emulate DirectInput's events, for example if I press a key in the keyboard DirectInput create a event. Thanks.
SendKeys using DirectX's DirectInput -
Since DirectInput works at the lowest level and obtains input directly from the keyboard, is it possible to invoke a SendKeys type function? It seems as though it would be possible. If not, what can do a better job than SendKeys, the SendInput API, and the Keyb_Event API?
GamePad input for DirectInput in VB6 -
I can't find a descent example anywhere that shows how to access the gamepad and buttons. At the moment I'm using the outdated DirectDraw7. I've found plenty of examples of how to use DirectInput for Keyboard strokes, But not Game Controllers. Any help would be appreciated, Thanks.
Detect 0-4 mousebuttons & all keyboard keys -
I've made a small vb game and i need to bind a key/mousebutton to do something, for example show a scoretable.
I want to be able to detect if a user-specified keyboard key/mousebutton is beeing held down!
It has to work with wierd keyboard keys like: ¨'´][ (just like in FPS g
[2005] Raising keyboard events in old games -
What I am trying to do is use a USB GamePad to control old games like MAME and Tomb Raider (that didn't support pads and joysticks) using DirectInput (DirectX 9).
I can run my app and open the Command Prompt and use the GamePad buttons in place of the keyboard but it's not working f
DirectInput problem - Simulating Keystrokes -
I'm trying to make a program that simulates a keystroke for a game (have tried keybd_event, and postmessage/sendmessage), and I can get it to work when the game is in a state where it seems to accept regular windows keyboard events (like, when you are typing text to say to another pers
Where can I buy a US keyboard in the UK -
It's a simple question. It's a stupid situation. I'm in the UK. I do not like the UK keyboard. I am accustomed to the US keyboard. I want to use the US keyboard. I don't want reasons as to why I should use the UK keyboard.
(I'm aware of using Regional settings, but I want th
Input Problems! Please help -
Hi,
I have a DirectInput game which I am creating macros for, I've written "man-in-the-middle" DLLs of dinput8.dll which allow me to access the game's IDirectInput8 and IDirectInputDevice8 interfaces, and through my debug messages I've managed to come to the conclusion tha
detect mouse/keyboard if not connected to CPU physically -
Hi there,
I've been trying this for weeks now. I've tried using the GetDeviceStatus() function from the DirectInput class of the Directx7 object that by right should return if a device created is attached to the system physically or not ? But it just doesn't work, where it always r
How to detect if mouse/keyboard are disconnected from the CPU physically -
Hi there,
I've been trying this for weeks now. I've tried using the GetDeviceStatus() function from the DirectInput class of the Directx7 object that by right should return if a device created is attached to the system physically or not ? But it just doesn't work, where it always r
DirectInput -
Hello,
I am currently working on a macro program for a game and it uses DirectInput.
Is there any way to send keys to that program?
I don't mind if I need to use other dll's or stuff like that.
Thanks!
keyboard question(Resolved) -
Is there anyway to just check if any key is being pressed with one line of code or do I have to check each key to find out if any of them are in use..
I dont want to log the key presses. Just want to see if the keyboard is in use.
Get my point?
Faking DirectInput -
I'm trying to find out.. if you have a program gathering its input through direct input, is there a way to simulate something through there?
Like a keypress or mouse move /click? I think this may be the reason a program I'm trying to create a macro prog for is ignoring a lot of my
keystroke question -
Hi guys, i am coding an application for touchscreen units and have make a keyboard for onscreen data entry. Trouble is i can't figure out how to tell which keys are pressed on the keyboard. I use a temp variable to store keys pressed on my screen keyboard but i also need to add strokes
on screen keyboard -
Hello.
I am trying to make an on-screen keyboard.
The idea is:
The user has the keyboard on screen.
When a key on the screen keyboard is pressed - the appropriate key press is sent to the control in focus as if it came from the real keyboard.
This MUST happen without the focus ch
Keyboard Hook -
I'm trying to set a hook so that I can respond to a key combo such as Ctrl+O, without having the app in focus.
I've tried the registerhook method but it's not comlpetely global, say if I have a game running the event is not fired when the combo is pressed.
I've looked at DirectIn
KeyPress for Keyboard Right click (RESOLVED) -
Hello I am trying to Trap for the right click option on the keyboard to be pressed but I don't know the KeyCode number to watch for. Does anyone have a sub sample for if the right click option on the keyboard is selected then it will perform a simple function even just a messagebox or
Input Update Q: -
I've seen now 3 tutorials do the following for managing the keyboard in DirectInput.
- Create 2 char[256] arrays
- Manage the keys in a keyup/keydown fashion using the 2 buffers
- Loop through all 256 keys to fill the buffer.
While I:
Simply Get DeviceState to fill one buffer
Keyboard speed -
I know this is not exactly a VB question but:
Anyone know how to increase the keyboard rate and decrease the keyboard delay beyond what one can do in the control-panel?
Will some API call do the trick?
When I am programming I think it is better to be able to move fast up and dow
Keyboard and Mouse Dead [resolved] -
I have an interesting problem for you all. There is a windows 98SE machine in my office which was running fine for as long as it has been here. Yesterday I sat down and used the windows add/remove programs function to remove MS Office XP Pro from this machine. Everything went fine a
[2005] how get access of keyboard strike handler -
hi all
i am working on project and requirement is that to get keypressed log,
i simplify my question that, i use keyboard to write in text file ,word file whatever so , now i require that all of the keypressed should maintain a duplicate copy at location c:\log.txt.
i am also usi
windows/bios keyboard buffer question... -
I have a question... I started up my trusty "cmd" prompt under windows and I dumped the part of BIOS memory related to the keyboard buffer (16words). The problem is that it only contains keyboard information captured from inside the prompt. It does not capture key strokes f
[2005] IDE keyboard newbie question -
the following keys on my keyboard dont seem to respond in VS 2005:
enter
delete
f1- f12
tab
backspace
how do I make the keyboard act "normal"?
Disabling keyboard -
Hi,
Can anybody suggest how to disable the whole keyboard? I don't want the client to give any input from keyboard. But, I want to use mouse. I want to make keyboard like its disconnected physically from CPU. Can anybody help me..
Thanking You.
Need help with a Touch Screen project. -
I have several forms with buttons and textboxes (see photo below) I also have a virtual Keyboard that is called by these buttons to allow operator to enter text into the textboxes in these forms.
Question:
How the keyboard would know which form call it and where to put the text str
fake keyboard -
My PC wont boot without a keyboard being attached (its an OLD PC!), one of those with a large round keyboard plug.
I don't want to have a keyboard attached to it so is there any way to make the machine think its got one when it hasn't?
I'm prepared to cut up / modify the keyboard
Other input Devices with DirectInput -
Hey all,
I am trying to figure out how I can detect a device I have connected to my machine. It is a footpedal device I am trying to use with my app. How do I detect what the device properties are for this device? It has three buttons total and was recognized as a compatible direct
WinXP keyboard prob -
sometimes when im using a program the mapping of my keyboard changes mappings... like now!
pressing the question mark backslahsh key is é
and the tilda is #
the square brackets are ^¸
and aggravating . apparently this is the french keyboard or something.... it happens appare
Keyboards -
I have an old 8088 IBM keyboard and an old 8088 AST keyboard.
The IBM works fine with any pentium, yet the AST has failed on all
pentiums I've tried.
Since both were designed to work with 8088 chips, can someone explain:
1) why one works on the pentium and other doesn't (e
Disable the key bord(a question) -
Hi everybodey
how can I make a program that disables the keyboard after a specific period of time(JUST THE KEYBOARD!!!)?
directinput mouse input -
what Im trying to do is make my own keylogger which globally records all keys / mouse clicks. (count only)
when it comes to keyboard im fine thats all good. The mouse I can do as well except when any directx game or opengl game is run the mouse will not register, not only that it make
Keyboard problem with Windows 2000 -
Hi !
I lost the keyboard use with a VB application at run time. This problem occurs randomly. When I disconnect the keyboard and then reconnect it, the keyboard is back !!!!
DLL Wrappers -
Could anyone tell me how I would go about writing a DLL wrapper? I'm trying to write one for directinput and no clue if I'm going in the right direction.
What I did was change the name of dinput8.dll to olddinput8.dll and in my DLL I declared the functions of directinput (found in
Keyboard problems!!! -
I am having some keyboard problems and would like to know what kind of commands/utilities (VB or API or 3rd Party OCX or ANYTHING) that I have available for use in manipulating the keyboard.
Specifically:
1) Clear the Keyboard buffer
2) Simulate Holding a key down
OPINIONS
using an musical amiga keyboard with a IBM -
Hi all.
I have an amiga keyboard at home (the piano type) and want to hook it up to my win 98 IBM machien. Will my keyboard be compatible with the my IMB?
Where would i find drivers for my keyboard. Thanks
Goodbye Laser Keyboard 6000 v2.0 -
My Keyboard died today im not sure why but im quite sad because of it, it wont pick up the wireless antenna.
Im now using a wired microsoft reclusa keyboard, and habu mouse. The mouse is so pricise and lights up blue!!!!
The keyboard lights blue too but i miss my keyboard, gonna
Get the Keyboard Layout -
Hello, I want to be able to determine the keyboard layout of the active window.
Being more specific, I use GetForegroundWindow() to get the handle of the active window. Now I wish to get its keyboard layout.
If anyone can give me any insight as to how to accomplish this, I shall
Problem with my keyboard (not a VB question) -
As I said, this is not a VB question, but I have a thing on my mind which is bothering me.
I would like to disable the Windows Key and the Context Menu Key on my keyboard, withought having to hurt my keyboard.
They are really annoying me.
If this isn't possible, is there any way I c
US Keyboard Layout -
Okay, it's like this! I need a picture or something of an US keyboard. How it look like, how the keys are placed.
(I use a swedish keyboard, thats way...)
Then i wonder: The keycode that you can get from the keydown sub. Example is the keycode for "A" the same in swedish