Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion Goto page 1, 2  Next
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Fri May 16, 2008 5:09 am   

[2.25 - 2.27] F-keys used as Macro failures
 
Randomly and for no apparent reason that I can see, F-keys stop working as macro keys. That is, when assigned keys are pressed they will do nothing. The only way so far I've been able to restore functionality is by re-starting the client.
_________________
Sic itur ad astra.
Reply with quote
Brenex
Beginner


Joined: 13 May 2008
Posts: 25

PostPosted: Fri May 16, 2008 6:18 am   
 
Put the cursor in the box used to designate the key and press Return. In the new window that opens press the f key you want to use.
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Fri May 16, 2008 7:50 am   
 
You misunderstood me. I am not trying to create a Macro key. The key already exists. It just doesn't work anymore...
I think I know why. When I looked at the compiled code for the key, it shows it to be in a class which is actually an auxiliary window. When I deleted the window, the keys began to work again. Now, the key should have class Macros assigned since that is the class folder where they are located. In previous versions of CMUD, I noticed that class miss-assignment in the compiled code was a common occurrence, but since it never had an impact, I didn't worry too much. It seems, though, that in CMUD 2.25, this misplaced assignment of entities does cause problems.
EDIT: Now that I've deleted the auxiliary window, the compiled code shows the macros as belonging to the root superclass (main window). So the class assignment is dynamic. Next thing to test will be if creating a new window will cause a re-assignment.
_________________
Sic itur ad astra.
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Sat May 17, 2008 9:45 pm   
 
OK, the macro situation has now become chronic. As I mentioned in my last post, the problem seems to stem from the fact that CMUD is re-assigning the macros to classes other to the one they belong to. When I found the macros assigned to an auxiliary window class, I deleted the window and that allowed to macros assigned to the F-keys to become operable again.
Now, they have been re-assigned to a permanent class which I cannot delete because it is a critical one. They keys again don't work. I point out here that macros assigned to non-F keys work just fine. I am sure this can be called a bug.

EDIT: "Magically" the macros got re-assigned back to the root superclass and began working again.
_________________
Sic itur ad astra.
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Sat Jun 07, 2008 6:33 am   
 
I have found a solid link between the F-keys assigned as macros failing to act and the Editor. While it may not be the case that if the settings editor is open the F-keys will fail as macro keys, it is always the case that if the editor is open and the keys are failing, closing the editor will restore the keys functionality.
I am not making a claim that the open editor ins hindering the F-keys' functionality. I am making the claim the closing the editor will restore the their lost functionality.
_________________
Sic itur ad astra.
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Sat Jun 07, 2008 2:23 pm   
 
That makes sense Anaristos. Do you already have the setting macros override Windows shortcuts checked?
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Sat Jun 07, 2008 6:07 pm   
 
Yes, I have. These events started with 2.25. Prior to that, there was no problem. I am in the habit of keeping the Editor open because I am always working on something while playing the game. So there was no relationship between the F-keys and the Editor prior to this last 2 releases.
_________________
Sic itur ad astra.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Jun 09, 2008 5:40 pm   
 
Well yes, as you mentioned, the Settings Editor *does* use the F keys. If the settings editor has the current focus, then the F keys are going to go to that window and not your MUD window. This is true of any key, so I'm not sure how this would work any differently. If the editor is open, the F macros work fine as long as the editor is in the background or minimized and doesn't have the keyboard focus.

The editor has always used the F keys, so that hasn't changed any time recently. And I just tested 2.26 myself and when the editor window didn't have focus, my F-key macros worked fine in the main window.

My guess is that somehow your settings editor is getting the keyboard focus and that this then causes your F keys to stop working. I don't know how this might happen, but just clicking on the main MUD window should restore the keyboard focus back to the command line. If you can reproduce a way for the settings editor to interfere with your F-keys even with it doesn't have the keyboard focus, let me know.
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Tue Jun 10, 2008 12:11 am   
 
I will try to reproduce it. However I think this is only part of a larger problem. I think this is linked to the other problem I posted referring to the random menu pop-ups while typing commands if I happen to press keys that would normally trigger menu selection if used with the ALT key.
While typing on the command line, suddenly menus start dropping and the problem persists until I hit the ESC key repeatedly. The F-key problem and this problem happen together many times. As for the editor interference, I cannot testify to the fact that prior to my discovery of the connection to the Editor, the Editor was involved. All I can say is that if the F-keys stop working and the Editor is minimized, closing the Editor restores functionality. I cannot exclude, yet, that this may happen when the Editor is not active (whether or not it is minimized). To this end I am now closing the Editor as soon as I finish using it.
_________________
Sic itur ad astra.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4672
Location: Pensacola, FL, USA

PostPosted: Tue Jun 10, 2008 1:44 am   
 
ALT seems to be a toggle in normal windows environment, recognizing as depressed until a shortcut is activated or ALT is pressed again.

It almost sounds like CMUD is not untoggling ALT with user defined macroes.
_________________
Discord: Shalimarwildcat
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Jun 10, 2008 4:20 am   
 
The ALT key problem was a bug that was fixed in the 2.26 version. Are you sure the problem is still happening in 2.26?

The ALT key will still toggle the menu in the settings editor if the settings editor has the keyboard focus. But ALT should no longer toggle the main MUD menu when the main window has the focus and the "Override menu shortcuts" option is enabled.

So again, if the keyboard focus is changing to the editor window, then ALT will activate the menu and the F-keys will activate shortcuts. So yes, they *are* related in that they will both happen if the keyboard focus gets switched to the settings editor window.
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Tue Jun 10, 2008 4:44 am   
 
The Macros override menu shortcuts is checked in my preferences. I am running CMUD 2.26 and I can say that the problem is now more pronounced than it was in 2.25. I even get the command line to expand into a mini-window in many occasions. As I said before, hitting ESC repeatedly restores the normal functions. I will try clicking on the session window to see if this also restores function.
What shalimar posted seems to make a lot of sense.
_________________
Sic itur ad astra.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Jun 10, 2008 5:15 pm   
 
Well, Shalimar is incorrect. When you have a macro assigned to an Alt-key, CMUD is intercepting it at a low-level and preventing the ALT from getting to windows in the first place. So there is nothing to "untoggle" in that case.

What do you mean by "I even get the command line to expand into a mini-window in many occasions"?? Are you saying that the command line becomes undocked? That can only happen if you double-click the "grabber" on the left side of the command line toolbar, or if you drag the grabber with your mouse to undock the toolbar. That isn't even going to happen "accidentally" unless there is something wrong with your mouse driver or something. I don't even know of any keys that will cause this...it can only happen with the mouse. So that sounds like something completely different to me.

Hitting ESC will normally close the Settings Editor window if it has keyboard focus. So it still sounds like your settings editor is getting focused.
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Tue Jun 10, 2008 11:49 pm   
 
I think that saying that the command line becomes a mini-window is the wrong description. What happens is that it suddenly expands and becomes multi-line, showing the last few commands that were entered. Again, hitting the ESC restores the command line to its original state. This command-line events happen during the period of time when the menus are also dropping down, so I am sure that it is caused by the same problem. Here is something that might shed light. I have ALT-G assigned to a macro. While this episode is in progress, if I hit ALT-G, it will minimize CMUD. So something in the ALT key handler is running amok.
_________________
Sic itur ad astra.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jun 11, 2008 12:27 am   
 
Sounds like you need to make me a screenshot because I still don't understand what you are talking about with the command line. The command line will never show "the last few commands" that were entered, so that's impossible. Maybe you clicking on the command history which displays a popup menu of the recent commands...that's the toolbar button to the right of the command line normally.

And I have no idea how ALT-G would ever cause CMUD to minimize. That shortcut isn't used anywhere in CMUD that I am aware of.

Honestly, it sounds more like something is running amok on your computer with either your mouse or keyboard (or both). Especially since nobody else is reporting anything like this and none of us can reproduce it at all.
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Wed Jun 11, 2008 1:04 am   
 
Yes, that is what it looks like, exactly. As if I had clicked on the command history. But what I am actually doing is typing on the command line when this happens. As soon as it happens again, I will post the screenshot.
_________________
Sic itur ad astra.
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Fri Jun 13, 2008 3:07 am   
 
Well, Zugg, it seems that in 2.27 the problem persists. Both the F-key macros becoming disabled when the Editor is open and the random menu pop-ups while I am typing on the command line.
_________________
Sic itur ad astra.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Jun 13, 2008 3:53 am   
 
Not sure what to suggest then, sorry. I'm not sure you mentioned what version of Windows you are using, but it sounds like a problem on your computer or session settings. I tried it on four computers today and couldn't get it to fail in either blank sessions or in my own MUD sessions. Don't know if it's an OS issue, or a settings problem. Maybe a completely clean install would help. Or maybe it's an issue with your keyboard/mouse drivers. But unless someone else can reproduce this problem and we can get more information about it, there isn't much I can do on this end.

Just keep in mind that if the Editor gets the keyboard focus, then your F-keys won't work, and that is by design. So you might need to keep the editor window minimized or closed more. As far as the random menu popups on the command line, I can't even imagine how that would possibly happen. The history menu doesn't have *any* keyboard shortcut assigned to it, so I can't even make it popup with any keyboard pressing. Only by clicking the mouse on the toolbar button can I get the menu popup. So that sounds more like a hardware driver issue and nothing I have ever seen before.
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Fri Jun 13, 2008 4:08 am   
 
I see what I can find. I must say, though, that this problem started with 2.25. I never experienced this problem with either 1.34 or 2.18.
_________________
Sic itur ad astra.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Jun 13, 2008 6:25 am   
 
So far the only thing I found with this is that there is a spot that does not properly set keyboard focus into the command line. Clicking in this spot does bring the session window to the front, but when the previous window is the Package Editor it still catches function keys.

Procedure
1. Launch CMud
2. Close Sessions Window (ESC)
3. Open Package Editor (CTRL-G)
Note that display option is set to Show All
4. Left-click in the status bar area
5. Press F7
6. Press F7
7. Close the spell check pop up
8. Bring the PE to the front (CTRL-G)
You will see that the display option is now set to Show Paths. The first press of F7 went to the PE. You should also see that keyboard focus never got set into the command line. Interestingly the PE only gets 1 keypress, so replacing step 6 with "Press d" would seem to send the 'd' to the PE, but it throws it away.

That seems to be the whole problem with the PE and function keys. Now to further define the problem with clicking in the status bar we should use the text Editor window, because it is easier to see the problem.

Procedure
1. Launch CMud
2. Close Sessions Window (ESC)
3. Enter at the command line
Code:
#KEY F10 {abc}

4. Open Editor (CTRL-SHIFT-ENTER)
Note that the untitled in the Editor is orange, and the untitled session window has turned blue
5. Click in the Status bar area
Focus is properly set into the command line and the untitled session window has turned orange
6. Click on the Editor title bar to the left of the minimize button
Now the untitled session window is still orange, it thinks it did not lose focus
7. Click in the status bar area.
This time keyboard focus is not properly set into the command line.
8. Press F10 repeatedly, paying attention to the menu bar getting activated and deactivated.

So 2 different bugs, one is a focus bug, and the other is that the PE receives one keypress in that state. I couldn't find any other window that catches a keypress in the out of focus state.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Fri Jun 13, 2008 9:11 pm   
 
OK, that explains one problem. The problem with random menu pop-ups while typing on the command line is still unexplained. I still think that the ALT-key gets toggled somehow. It may not be what is actually happening but it is certainly a good model to describe the events.
_________________
Sic itur ad astra.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Jun 17, 2008 8:54 pm   
 
I am giving this a bump to make sure Zugg saw to procedure details I posted earlier. I am also changing the topic title to reflect it being confirmed in 2.27. I really feel there is just too many weird things occurring within the procedures I found for it to be ignored.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Jun 17, 2008 9:11 pm   
 
On my system, in steps 5 and 6, both F7s properly go the the package editor. Clicking on the status bar doesn't focus the command line. Only clicking on the main MUD output or the command line itself will focus the command line. Maybe I could fix that. But in general clicking on something isn't going to give focus to the command line unless I have specifically programmed it to do so (except for the command line itself of course).

I think part of the problem might be with the DevExpress toolbar system that is handling the menu shortcuts (which is what F7 is). Clicking on the Status Bar gives it the focus (not the command line), which causes Windows to bring the main window to the front. But somehow the Package Editor is still the focused window for menu shortcuts instead of the main window. I think that somehow the DevExpress system must be searching all open windows for shortcuts or something. If it doesn't find a shortcut in the current window, then it must start looking in other windows.

For example, the F7 key isn't a menu shortcut in the main window. It is only a command-line specific shortcut for the spellchecker. So when the status bar has the focus, pressing F7 makes it look in the main window for a shortcut, which it doesn't find. Then somehow it is looking in the package editor and saying "oh, I found a shortcut here".

Part of the reason I think it does this is for docked windows. For example, when the mapper is docked we have seen some cases where pressing a shortcut activates the shortcut in the mapper window if the shortcut doesn't exist in the main window. I think the DevExpress toolbar system is trying to be too smart by looking for other open windows because of problems with Windows keeping track of which window is on top. So they might have kludged their system by looking in any open window, regardless of whether it has focus.

I'm not going to mess with the DevExpress components at this time. I don't actually care if F7 activates the package editor shortcut normally if the package editor is open. The problem I need to solve in CMUD is when you have a macro assigned to the F7 key. That macro needs to be executed when the Status Bar has the focus instead of passing it to the settings editor. I think that it the main problem being reported here, and the one that I have the best chance of tracking down.

When I work on the mapper and getting it to work better with the docking system, then I'll be playing more with this menu shortcut stuff and maybe then I'll figure out exactly what the DevExpress code is doing.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Jun 17, 2008 9:18 pm   
 
Yeah, I just learned something else weird about the DevExpress toolbar keyboard shortcuts. If a edit field within a toolbar has the keyboard focus, shortcuts for *that* window don't seem to have priority.

For example, open the Package Editor. Press Ctrl-F to activate the View/Find shortcut. The search bar will be displayed. If the keyboard focus is within the Search for field, then pressing Ctrl-F again will activate the Find shortcut for the main window, not for the package editor.

Another example: click in the Package: field in the package editor main toolbar. Now press Ctrl-F. Note the Find shortcut in the main window activates.

So this is definitely some sort of bug in the DevExpress code for searching for shortcuts.

Edited: But I did improve the Macro stuff in CMUD so that a macro (like F7 for example) will still execute even if the command line doesn't have the focus (like if you click on the status bar instead). Also, clicking on the status bar in 2.28 will focus the command line.
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Tue Jun 17, 2008 9:35 pm   
 
I would like to see the status bar being clicked as sending the focus to the command line. I think that most people would prefer that functionality, as the status bar is normally part of a specific session, and when I click anything that has no clickable properties, I want it to go to the command line for that session.

@Anaristos:
The menu pop ups has some interesting possibilities that I've come across myself in both zMUD and CMUD. And it is user error in all 3 cases ;)

Case 1:
This occurs when you have alt-key macros. You go to use the macro, get as far as pressing alt, but never press the other key. Then you release alt and voila, your next keypress opens a menu. I've done this SO many times I can't believe it. Without even noticing till it pops up the menu.

Case 2:
This occurs when you accidently have sticky keys turned on. Make sure they're off. Otherwise, pressing ctrl, alt, or shift and releasing makes windows think its still pressed. I'm sure you've thought of this though.

Case 3:
This one is as simple as accidentally brushing the alt key when you press the spacebar. This isn't very common, but CAN happen.

Otherwise, I can reproduce Vij's steps for the one bug, but I cannot reproduce the menu issue either. Sorry.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net