Arrows, Home, etc. Not Working

197 views
Skip to first unread message

Amicus

unread,
Apr 2, 2011, 10:26:25 PM4/2/11
to VoiceAttack
Hi,

I have found that for at least two games the non-number keys that have
both keypad and non-keypad versions are not working with Voice
Attack. The keys affected are all the arrow keys, home, end, page-up,
page-down, delete, and insert. The two games are STO (which others
have mentioned the arrow keys) and Star Trek Bridge Commander. It
would seem that there may be a difference in the code used for the
number pad version and the non-number pad version of these keys. In
both games using the Voice Attack version of the non-number keys
actually causes the keypad number keys to execute; i.e., Voice Attack
"Home" results in Key Pad 7, End results in 1, Right Arrow results in
6. Fiddling with the numb-lock has no affect (even using a command to
"release" the num-lock could not get the non-number keys to execute).
I suspect the game designers did not want the num-lock to affect play
of their game, and so programmed both versions of keypad keys to
execute the same way. Both games do use and respond to the non-number
keys (home,etc.) in their non-keypad positions, so it is a bit
inconvenient not being able to use Voice Attack for the execution.

Hope you might figure out a correction for this some day. Great
program which I highly recommend even with this limitation.

Amicus

Gary

unread,
Apr 2, 2011, 11:21:33 PM4/2/11
to voice...@googlegroups.com
Hi, Amicus.  Thanks for your inquiry & I'm glad you are enjoying VoiceAttack :)
 
There are two sets of scan codes that VoiceAttack uses for input.  In the 'Edit a Keypress' screen, there is a radio button that has two options :  Standard and Windows Game (DirectX).  I was able to reproduce your problem using Notepad.  First, I used the non-numeric keypad 'home'.  When I selected, 'DirectX' as the input method, it puts a 7 (just as you said).  I changed the setting to Standard and it moved the cursor to the first position (just as if hitting the home key). 
 
Have you tried your games using the Standard key input method?  If not, can you do me a HUGE favor and try that out?  Let us know what you find (good or bad).
 
Sincerely,
 
Gary

Amicus

unread,
May 30, 2011, 11:27:15 AM5/30/11
to VoiceAttack
Hi Gary,

Sorry about the delay in responding; g-mail is not my primary e-
mail.

I gave "Standard" entry method a try, and it does change the behavior,
but still does not work. With Standard I no longer get the incorrect
keys, i.e., 7 instead of Home. However, it does not register the
correct keys either. For example, in STO the Home key is used to
reset the screen view to default distance and position. When I
execute the command using VoiceAttack and Standard entry mode, it does
nothing but give a beep (as if the command was not recognized). Same
with PageDown key. The keys work when entered manually. I only
tested those two keys this time.

Amicus

Gary L. Magenheimer

unread,
Jun 1, 2011, 10:05:05 PM6/1/11
to voice...@googlegroups.com
Hi, Amicus. I'll take another look into this & see if I can come up with
anything. I haven't done a code dive for a while & this will be good :)

Jeffg100

unread,
Jun 26, 2011, 12:07:10 PM6/26/11
to VoiceAttack
Thought I would add to this.

here is the weird thing with STO. The arrow key and keys like end and
home do not work in game to control the ship or game in anyway.
However, if you go to enter a chat message the keys get sent just fine
(left arrow move the cursor and end goes to end of the line ect. So I
am not sure what is happening. I tried delays as well with no luck as
well.

Just more FYI for you. BTW love product and if I can be of any more
help to you let me know.

On Jun 1, 9:05 pm, "Gary L. Magenheimer" <magenhei...@gmail.com>
wrote:

Jeffg100

unread,
Jun 26, 2011, 12:14:32 PM6/26/11
to VoiceAttack
Also wanted to add this as I just dicovered this with STO key binds
seems with numlock on (where you get numbers form the numpad) STO will
not accept anykey press from them as valid except in the chat msg box.
with it off the key binds stats numpad 1, numpad 2 ect..

On Jun 1, 9:05 pm, "Gary L. Magenheimer" <magenhei...@gmail.com>
wrote:

Gary

unread,
Jan 28, 2012, 11:40:04 PM1/28/12
to voice...@googlegroups.com
Ok, well...  a half a year or more later, and, here is what I've found regarding the numeric keypad and DirectX (this is news to me, too) :

Holding down the Shift key while hitting, say, Numeric pad 6 will result in a, 'Right' DirectX scan code.  Shift + Numeric pad 8 results in, 'Up', Shift + Numeric Pad 7 results in, 'Home', etc.  Works just like the hardware keyboard.   <--- don't forget to add a key delay, otherwise DirectX games may (will) miss your keypress in its polling.

I apologize...  I thought I had hit a wall on this, and, basically forgot all about it.  I whipped up an XNA Windows game in Visual Studio as a test harness to see what was going on under there.  The alternate keys (delete/home/ins/arrows/etc) in the numeric pad register as the same scan code as the keys in the center cluster.

I hope this solves the problem :)

Yanitch

unread,
Jan 29, 2012, 3:48:52 PM1/29/12
to voice...@googlegroups.com
Thanks for looking into this Gary, I've done some testing on the issue and my findings are below. I have a CH Multifunction Panel which has a key check utility on which I can see exactly what keys it thinks are being pressed. If we just take the example of the right arrow and numpad 6 keys these are reported as 'Right Arrow' and 'Keypad 6'.
In all the tests I did, the key checker only ever reported 'Keypad 6', never 'Right Arrow'. However, if you program it like you suggested, i.e.
 
Shift Down
Pause
Right Arrow (or numpad 6, it makes no difference)
Pause
Shift Release
This has the effect (you can check it in Notepad) of the following:
If numlock is on the effect is 'Right Arrow'
If numlock is off the effect is 'Shift-Right Arrow'
So it's still not quite right but it may well fool most games.
There is still a problem though as you cannot simulate a 'Numpad Enter' with this method.
 
Is it possible to identify the keyboard scan codes as these are different for every key on the keyboard? (I've not been a programmer for a long time now so tell me I'm talking crap if you want!)
 

Gary

unread,
Jan 29, 2012, 5:07:50 PM1/29/12
to voice...@googlegroups.com
Thanks for working with me on this, Yanitch.  I appreciate you taking the time to help me hammer this one out.  Not exactly sure if this will help, but, here's a bunch of rambling :



Here's what I found with using the DirectX test harness (I can't use Notepad for testing this, since it behaves a little differently than a DirectX game):   The, 'Numpad Enter' key, when pressed (hardware keyboard) results in a Keys.Enter value.  Pressing the enter key in the alpha area results in the same registered key.  

The same goes for the Delete key in the center cluster (the one up there by home/end/insert/etc).  If I press it, the DirectX test harness indicates Keys.Delete.  If I hold down shift and press the, '.' key in the numeric pad, I get the same result.

Now, having gone through this, I can see how the VoiceAttack UI can be a little bit confusing.  It's a case where the UI matches what is going on underneath too closely.  For instance, there is no scan code for the, '$' key, so, in VoiceAttack, you can't specify this as a key.  You would have to do a, 'Shift + 4' (the alpha 4).  Likewise, if you are wanting to do a Right Arrow from the numeric keypad, you do not have that as an option.  You have to do a, 'Shift + Numpad6', or, hit the right arrow key in the center cluster.  Short of providing a graphical representation of a keyboard, I'm not sure how to implement this properly.  I could possibly pop up a box when in, 'DirectX mode' and a numpad key is pressed...   





Yanitch

unread,
Jan 31, 2012, 8:31:32 AM1/31/12
to voice...@googlegroups.com
I see what you're saying but I don't think it will work properly as it is at the moment. Firstly, you can never get a numpad enter key press and secondly, if I want to press left arrow I will either get left arrow or shift-left arrow depending on whether numlock is on or off.
What I think is needed is something which will identify which key is actually pressed regardless of its shift state. It must be possible to do this somehow as the CH multifunction panel does it. There is also a guy who has written Vista/Win7 drivers for the older DX1 panel and this does the same.The software, with source code is available here:
Also, if you scroll down that blog to the comment made by a guy last Feb he has included a list of all the scancodes for the individual keys.
I had a quick look at some of the source code but I'm afraid I've been out of programming too long to make much sense of it :(
I didn't think this would be too much of an issue as I can usually remap a key in the game and then set it up in VA appropriately but yesterday I wanted to program a 'left arrow' then 'enter' to move a selection to the left before pressing enter but of course, I can't do that.
Sorry for the long post :-/

Gary

unread,
Feb 1, 2012, 1:21:58 AM2/1/12
to voice...@googlegroups.com
Yanitch :

Thanks for the info.  Again, I appreciate your efforts here :)  I think I'm finally catching on to your problem.

I can see the scan code difference for the numeric enter, and, I was able to test this with the DirectX test harness, and, it is detecting it as, 'Enter'.  DirectX does not differentiate between the two, but, it is still detecting as an, 'Enter'.  On the flip side of this, I'm using Windows events to grab what keys are being pressed in the Add/Edit Keypress screen (to facilitate a somewhat quick way to enter single keys).  The Windows API is reporting both enter keys as the same value (VoiceAttack can not tell the difference, because Windows is not supplying a different value).  At this moment, I'm not up to creating a graphical representation of a keyboard (maybe one day), but, I'm thinking that, instead of just popping up the verbiage of what key was pressed, I could just autofill a dropdown box.  The box will contain all the keys we have now, and then any of the alternate codes you find in the numeric keypad.  This way, we can satisfy a fairly quick input for single keys, as well as provide a complete set.  Does this sound like we're on the same page?

Gary

Yanitch

unread,
Feb 1, 2012, 9:52:50 AM2/1/12
to voice...@googlegroups.com
Right, I've done some further tests and this may end up being a non-issue. I've programmed a voice command 'affirmative' to press the left arrow (not numpad 4) then enter.
 
If I test this in notepad I get two results as follows:
If numlock is off: 'left arrow',  'enter'
If numlock is on: '4', 'enter'
 
So, on the surface it looks as though it's not working. But in game (I'm using X3 for this) whether numpad is on or off I get a 'left arrow' then 'enter' although my keycheck utility reports it as 'numpad 4'. Interestingly, if I hit the numpad 4 key, whether numlock is on or off, I get '4'. So, at least in this specific case, it's working as intended.
 
I tried programming the numpad enter key in a command but that just gets interpreted as a regular enter key. This shouldn't be too much of an issue as anything which uses numpad enter in game can probably be remapped.
 
At least we've got the directional keys working (hopefully the Home, End etc keys will work the same, I'll test those later) which should be all that's necessary.
 
Reply all
Reply to author
Forward
0 new messages