Author Topic: "ghost" mode when coming back to SE via alt-tab  (Read 2855 times)

jcelle

  • Senior Community Member
  • Posts: 266
  • Hero Points: 5
"ghost" mode when coming back to SE via alt-tab
« on: August 12, 2022, 06:24:52 AM »
Hello,
I've had this problem with SE forever. When I switch back to SE using alt-tab, SE does not have a normal focus:
- caret is a big rectangle that I can move around using arrows (instead of small 'underline' caret, even insert mode uses a small rectangle)
- text I type is ignored except letters that correspond to a top menu shortcut: in this case the appropriate menu is activated.
I have bound function mdisetfocus to ESC key to be able to recover from this, which I call the "ghost" mode, but this prevents me from having some ESC keys features such as clearing multiple cursors (another annoyance).
I am attaching a video to illustrate this.
SE is the only application with this behavior. I can atlt-tab between any other windows normally.
Do you see anything that could be causing this ?
Thanks.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7085
  • Hero Points: 537
Re: "ghost" mode when coming back to SE via alt-tab
« Reply #1 on: August 12, 2022, 01:07:33 PM »
Thanks for the video. So far I can't reproduce this. Can you reproduce this with a default config?

vs +new -sc c:\temp\new-config-dir c:\temp\tempfile.txt

I might need your user.cfg.xml.

jcelle

  • Senior Community Member
  • Posts: 266
  • Hero Points: 5
Re: "ghost" mode when coming back to SE via alt-tab
« Reply #2 on: August 12, 2022, 09:22:37 PM »
Thanks for your reply.
Yes, it happened straight away with the new config launched as you indicated.
Attaching my user.cfg.xml.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7085
  • Hero Points: 537
Re: "ghost" mode when coming back to SE via alt-tab
« Reply #3 on: August 12, 2022, 10:06:37 PM »
I am unable to reproduce this with a default config or your config which I shouldn't need because you say you can reproduce this with a default config. I've tested on two different windows machines (a slow laptop and a fast desktop). Also tried multiple monitors to see if that made a difference.  Do you have another Windows machine you can try? This could be due to some driver, added software, Windows version, or Windows configuration.

What version of Windows are you running?

Graeme

  • Senior Community Member
  • Posts: 2827
  • Hero Points: 347
Re: "ghost" mode when coming back to SE via alt-tab
« Reply #4 on: August 12, 2022, 11:06:29 PM »
I was able to reproduce this once just now but I can't make it happen again.  When I hold down alt, the accelerator keys in the menu are underlined and they stay underlined when I come back to slick.  I notice that there is some kind of rapid flash in the video when the alt key goes down - there should be no flash I think.  If there is a bounce on the alt key when it goes down, when you come back to slick the focus is in the menu rather than in the edit window, or the focus is nowhere.

Try enabling "hide tool windows on loss of focus" if it's not already.  Under keyboard and mouse -> advanced, try changing the alt key options.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7085
  • Hero Points: 537
Re: "ghost" mode when coming back to SE via alt-tab
« Reply #5 on: August 12, 2022, 11:33:01 PM »
Here's a good guess for fixing this. Try turning off "Alt menu" (Tools>Options>Keyboard and Mouse>Advanced). I can't reproduce this but this is definitely worth a try.
« Last Edit: August 12, 2022, 11:37:02 PM by Clark »

jcelle

  • Senior Community Member
  • Posts: 266
  • Hero Points: 5
Re: "ghost" mode when coming back to SE via alt-tab
« Reply #6 on: August 14, 2022, 04:32:47 PM »
Thanks Clark & Graeme.
This is indeed happening on my 2 windows 10 PCs.
This "alt menu" option looks a good solution: I turned it off and it looks better (I now see the big caret going back to normal insert caret automatically!).
« Last Edit: August 14, 2022, 06:34:56 PM by jcelle »

jcelle

  • Senior Community Member
  • Posts: 266
  • Hero Points: 5
Re: "ghost" mode when coming back to SE via alt-tab
« Reply #7 on: August 14, 2022, 05:06:39 PM »
I removed also my old ESC-mdisetfocus binding.
I still can't dismiss multiple cursors using ESC : should I bind ESC to something special (any default value) ?
Thanks.

Funny, ESC has to be bound to cmdline-toggle to dismiss multiple cursors...
« Last Edit: August 14, 2022, 06:29:09 PM by jcelle »

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7085
  • Hero Points: 537
Re: "ghost" mode when coming back to SE via alt-tab
« Reply #8 on: August 14, 2022, 08:40:19 PM »
cmdline-toggle does dismiss multiple cursors. It can optionally clear your selection as well if you set the macro variable def_esc_deselects to 1 (this option is not in the GUI).

Glad turning off the "Alt menu" option fixed your problem. Some how SlickEdit is thinking you pressed and released the Alt key without any key presses in between and activating the menu.

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: "ghost" mode when coming back to SE via alt-tab
« Reply #9 on: August 15, 2022, 11:00:59 PM »
I've seen this problem occasionally, but I've never had a good repro.
The alt-menu thing was a good hint, I now have a repro!

1. Enable Alt-Menu.
2. Tap Alt
The cursor changes to a block to indicate the mode change. (If you press arrow keys now it affects the menu bar).
3. Alt-Tab to another app
4. Alt-Tab back to slickedit
5. Arrow keys now move the cursor.
6. the "E" key opens the Edit menu.

Repro2:
1. Tap Alt
2. Tab WinKey (opens Start)
3. Tab WinKey (Closes Start)
Slick now in Ghost mode.


Interesting ... starting in Ghost mode
Shift-cursor to select a bit of text.
<E>: Opens Edit Menu
<C>: Copies selection.
Slickedit is still in Ghost mode.



jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: "ghost" mode when coming back to SE via alt-tab
« Reply #10 on: October 21, 2022, 05:14:31 PM »
This still happens in released V27.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2929
  • Hero Points: 153
Re: "ghost" mode when coming back to SE via alt-tab
« Reply #11 on: October 25, 2022, 06:15:54 PM »
What tool windows you have up?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7085
  • Hero Points: 537
Re: "ghost" mode when coming back to SE via alt-tab
« Reply #12 on: October 25, 2022, 06:58:21 PM »
Have you tried turning off "Alt menu" (Tools>Options>Keyboard and Mouse>Advanced)