Game Development Community

Bizaare Keyboard bind issue

by Gordon Marsh · in General Discussion · 07/12/2006 (4:34 pm) · 5 replies

I am implementing a new chat system at the moment, and for the time being I've mapped all the alphanumeric keys in the following fashion in the default.bind.cs file:

moveMap.bindCmd(keyboard, "a", "$player.updateChat(\"a\");", "");

I have deleted all prefs and DSOs before starting, but get the following issue:

All keys work fine except "p"... that is until I click in the old chat window, then back in the main screen, in which case 'p' starts to work fine.

Any ideas from anyone? I'm thinking there may be some keyboard refresh command that is called when you click off the old chat HUD, that I could call at the start of the game which would solve this issue.

Gords

#1
07/12/2006 (5:49 pm)
Could it be this line in default.bind.cs ?
moveMap.bind(keyboard, "p", resizeMessageHud );

(i found that by doing a find-in-files for "p" in all source files)
#2
07/13/2006 (1:37 pm)
Thanks very much again Orion, I had already commented that line out though.

For those interested my problem was caused by my play.gui file having the following at the top of it:

new GuiControl(OptionsDlg) {
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "0 0";
Extent = "1024 768";
MinExtent = "8 8";
Visible = "1";
Variable = "p";
Command = "p";
AltCommand = "p";
Accelerator = "p";
tooltip = "p";
langTableMod = "p";
helpTag = "0";

Assumedly it was interpreting the "p" press for the GUI first. I haven't actually fixed the issue yet, as I don't know if I can simply delete these lines, but this is the cause of my issue.

Gords
#3
07/13/2006 (1:38 pm)
Btw, although WinXP search failed me here, I used a tool called Agent Ransack to seach through all my cs files. Very useful. Available from download.com.

Gords
#4
07/13/2006 (2:08 pm)
I've run into something similar, it's kind of an odd thing but I think it's a bug because I hadn't set such settings on my controls. I deleted the offending lines and had no trouble at all.

That said, I'd say create a copy of the file first just in case I'm wrong. heh.
#5
07/13/2006 (2:33 pm)
Yup, deleting (or commenting) the offending lines (i.e. those with a "p" in my example above) did the job, and everything is A-OK now.