Windows Denied sound on alt keybinds
by Nathan Bowhay - ESAL · in Torque 3D Professional · 08/01/2012 (4:01 pm) · 10 replies
I mapped alt-v to opening a window and whenever I click it the windows denied sound is played. I noticed this doesn't happen in the Torque Editor and it brings up the view menu. I can't seem to track down where this is happening or where to disable it.
I noticed alt-some letter tends to open the menu bar item that starts with that letter in most windows applications.
Anyway any help tracking down where this is happening so I can disable it would be great.
I noticed alt-some letter tends to open the menu bar item that starts with that letter in most windows applications.
Anyway any help tracking down where this is happening so I can disable it would be great.
#2
as a result, guiEditor and world editor will not open in t3d.
[edit]
it only happened when both program is running
08/01/2012 (9:57 pm)
i use camStudio.using shortcut at f10 and f11 for pause and play.which will override t3d's keybinding.as a result, guiEditor and world editor will not open in t3d.
[edit]
it only happened when both program is running
#3
What allows for various programs to supersede other program's keybindings? I can not remember any game loaded on any PC that I owned in the past that would be entangled with the bindings of some other program while running.
This could cause issues later for clients buying our games if they happen to have keybindings in other programs.
08/01/2012 (10:34 pm)
Well then, there is something that may not be understood at a proper degree here and may come into use for others later. What allows for various programs to supersede other program's keybindings? I can not remember any game loaded on any PC that I owned in the past that would be entangled with the bindings of some other program while running.
This could cause issues later for clients buying our games if they happen to have keybindings in other programs.
#4
It doesn't have anything to do with me not being able to use the keybind that works fine, it is just making the windows ping/denied noise.
08/02/2012 (10:31 am)
There is nothing loaded on my computer doing it. I am running windows 7, but pretty sure it will be the case on all versions.It doesn't have anything to do with me not being able to use the keybind that works fine, it is just making the windows ping/denied noise.
#5
08/02/2012 (11:00 am)
I believe it has to do with Torque automatically assuming any Alt+<Key> being an accelerator for the menu bar dropdown menus instead of just checking with the actionmap first before passing Alt+<Key> events to whatever code that handles the menu bar, of which is usually only used in the editors. I would go code diving and start posting on here where in engine sources the modification could take place, but I'm currently busy with a work project and can't go code hunting right now. :)
#6
Then there is the popupMenu that uses Win32Window::AcceleratorList which I think is something internal to windows.
Since the one the editor uses is internal to windows my guess is it handles letting windows know "hey something happened when we hit the key, don't make a ding". At least that is just my guess.
Really though I think if any accelerator or action map in Torque does something with an Alt+ something keybind it shouldn't ding.
08/02/2012 (12:47 pm)
Well and then I noticed in code there are two types of accelerator and menu bar code going on. One is in guiMenuBar.cpp and calls getRoot()->addAcceleratorKey, this is more of an internal to Torque one that uses processKeyboarEvent in guiCanvas.cpp, which just calls acceleratorKeyPress in GuiMenuBar.Then there is the popupMenu that uses Win32Window::AcceleratorList which I think is something internal to windows.
Since the one the editor uses is internal to windows my guess is it handles letting windows know "hey something happened when we hit the key, don't make a ding". At least that is just my guess.
Really though I think if any accelerator or action map in Torque does something with an Alt+ something keybind it shouldn't ding.
#7
08/02/2012 (4:15 pm)
I remember some Alt+ keybinds I added back when working on the T3D FPS kit... If I recall correctly they only dinged when the game was windowed but were silent when fullscreen. Is that happening for you as well? Just thinking outloud but there might be some code somewhere within the windowed to fullscreen switch that would indicate how it turned off the dings.
#8
Somehow Win32Window::translateMessage needs to return true if there is an action map or keybind handling it.
08/03/2012 (10:46 am)
Yeah in full screen mode it doesn't do it. I actually sort of found out where it is being done I think, just not sure how to best address it. In win32WindowMgr.cpp Line 281 or so if translated is false it calls:TranslateMessage(&msg);If I comment that call out it doesn't happen, but that could probably cause other issues I am unsure about at this point. It seems any other keybinds like GuiMenuBar accelerators or ActionMaps are handled in
while(DispatchNext());
Somehow Win32Window::translateMessage needs to return true if there is an action map or keybind handling it.
#9
I will see if I can come up with a good solution, but this is a bit tricky.
08/08/2012 (3:16 pm)
I went ahead and tagged this with the bug tag as I feel it is a bug, just not a super important one. When torque handles a keybind using either the keybind system or the menubar or an action map it really should skip sending it to windows and log it as handled.I will see if I can come up with a good solution, but this is a bit tricky.
#10
Actually the whole menu bar is annoying. If you have a key bind that happens to match a Menu heading it handles both which can lead to unexpected results.
It seems to me an extravagant, possibly unwise, way to implement a gui control.
04/05/2013 (12:15 pm)
It's a bug. And it's pretty annoying to my users as we have a lot of key binds.Actually the whole menu bar is annoying. If you have a key bind that happens to match a Menu heading it handles both which can lead to unexpected results.
It seems to me an extravagant, possibly unwise, way to implement a gui control.
Torque Owner DreamPharaoh
Gods and Nemesis
I vaguely remember a similar issue and I believe I just resorted to changing the keybind to the enter key to interact with dynamic objects, but now I have to use the numpad's enter key to enter any console commands -- not a big deal, but this is still of interest to me for possible future bug elimination.