Skip to main content
gamedev.net
🔒 Locked

Managed DirectInput

Started by Trivex Apr 23, 2004 at 11:03 PM 0 replies 200+ views
Original Post
Trivex
Trivex
Hey. I''ve recently been playing with direct input and am not sure how to convert the key that was pressed into something i can display. I use a KeyboardDevice.GetPressedKeys to get an array of DirectX.DirectInput.Key which can then be used to identify the key. What i have done until now was use the key.ToString to retrieve the name of the key that was pressed. But the problem i have is that although DirectInput.Key.A.ToString is converted to "A", i cannot use that to convert the 1 button to a "1". Instead, it converts it to a "D1", which is the name in the enum. Is there any way that i can properly convert keys? Thanks.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.