Mirage icon indicating copy to clipboard operation
Mirage copied to clipboard

Windows-like flipping

Open fuhrmanator opened this issue 5 years ago • 13 comments

I tried Mirage finally and it is a big improvement. However, I was hoping to get it to work like Windows Alt-Tab (aka Flip) function which apparently is also in KDE, MacOS, iOS and Gnome.

First, I couldn't figure out how quickly to "go back to the last window I was in." The list of windows is absolute (rather than z-order), which seems to be part of the problem. Aha - I found the "World order" windows management setting.

As a use-case, I want to toggle between a Browser window and a Playground, because I'm copying/pasting bits of code. In Windows, you just hit "Alt-Tab-Tab (then release Alt)" and you can switch very quickly back and forth between two Windows. It's done with one hand.

In Mirage, there are many more keystrokes, and it also takes two hands:

  1. Ctrl-Tab (left hand, then you let go of Ctrl).
  2. Move (right hand) to arrow keys
  3. Press arrow keys until you find the window you want.
  4. Once you've highlighted the window, press return to select it.

So, I think it's basically asking for 1 thing to make it super ergonomic:

  1. Ctrl-Tab (or the key you configure) enters the switching mode, whereas releasing Ctrl exits it (maybe not possible in Pharo?). Successive Tab (or shift-Tab) without releasing Ctrl moves forward (or back) in the windows list.

fuhrmanator avatar Mar 17 '19 01:03 fuhrmanator

I can help with some of this - there is an option called World order windows managment, which gives that LRU ordering you want. I haven't managed to get ctrl-tab movement quite like you want, but when using the default key - shift-tab, tab, enter gives you a close proximity to ctrl-tab (albeit a few keys more).

macta avatar Mar 18 '19 15:03 macta

I just hacked quickly and I am close to get a working prototype. Once I have it I will ask you to test the dev branch to see if it works for you. :-)

juliendelplanque avatar Apr 10 '19 14:04 juliendelplanque

That’s exciting - will definitely like to try it along with trying out the other fixes you’ve done

macta avatar Apr 11 '19 06:04 macta

👍 I'm back on Monday from London, so looking forward to testing, tweaking, etc. I'm pharoless (without a PC to program) on vacation, as it should be.

On Thu, Apr 11, 2019, 07:44 Tim Mackinnon [email protected] wrote:

That’s exciting - will definitely like to try it along with trying out the other fixes you’ve done

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/juliendelplanque/Mirage/issues/17#issuecomment-481987471, or mute the thread https://github.com/notifications/unsubscribe-auth/AHQRDLRAzIM8B-Cz7CejH-HDkVlJgJ7Gks5vftnGgaJpZM4b4Hfp .

fuhrmanator avatar Apr 11 '19 09:04 fuhrmanator

Ok, I just pushed on dev branch the prototype. So you can try it out by loading (it works in P7):

Metacello new
    repository: 'github://JulienDelplanque/Mirage:dev/src';
    baseline: 'Mirage';
    load

The problem is, because of Pharo limitation, it is hard to make parametrisable the key binding to close mirage. For now I hard-coded it to be when you release shift key. But to find the value I had to do some retro-engineering. I think the actual Keymapping project does not manage actions to be done when a key is released.

For now, I set the binding to Shift+Tab and as I said you can not change it anymore.

juliendelplanque avatar Apr 15 '19 06:04 juliendelplanque

I discussed with Guille and apparently there is support for such key combination in Pharo. So I will find a way to make it configurable!

juliendelplanque avatar Apr 15 '19 09:04 juliendelplanque

Really appreciate you pushing on this one - anything to help make us more productive in Pharo is great.

If we can get it running smoothly - having a conversation around removing the old window switcher might be interesting. Not many even know it’s there, and it’s also very clunky

macta avatar Apr 15 '19 09:04 macta

I tried the latest on :dev and it doesn't work well at all in Windows Subsystem for Linux (I'll try again in native windows soon):

  • By default, Open shortcut is configured for Ctrl-tab.
  • I can't change it to Shift-tab, however, as that key is not recognized when I edit the field.
  • Entering another Shift combination, e.g., Shift-S is registered as Shift-Shift-S.
  • Shift-tab does NOT open the mirage carousel
  • Ctrl-tab opens up the mirage carousel
  • Ctrl-tab closes the mirage carousel
  • No other keys seem to have any effect.

fuhrmanator avatar Apr 15 '19 13:04 fuhrmanator

For now, I set the binding to Shift+Tab and as I said you can not change it anymore.

In Windows and other Window managers, Shift is a convention for changing the direction of tabbing, i.e., Shift-Tab is a reverse-tab. It's what I meant in the first message:

Successive Tab (or shift-Tab) without releasing Ctrl moves forward (or back) in the windows list.

So, I was implying in my request that Shift be used by convention to specify a change of order on direction. I think if Shift-tab is allowed as the shortcut to activate Mirage, it would disallow leveraging of this convention to specify ergonomically reverse-tab. I'm hoping you can get something to work with Ctrl-Tab.

fuhrmanator avatar Apr 15 '19 14:04 fuhrmanator

OK, @juliendelplanque, here's the Windows 10 feedback. It's definitely on the right track!

  • By default the shortcut is Shift-Tab
  • Successive Tabs while the shortcut is active indeed gives an ergonomic way to get to the previous window, especially when World order is active.
  • As I mentioned in my previous post, since Shift is part of the opening shortcut, it can't be used within the function to change direction of advancing the window selection.

As @macta said, this is a great feature to help productivity. Let me know how else I can help you!

fuhrmanator avatar Apr 15 '19 14:04 fuhrmanator

@fuhrmanator The thing is, I choose Shift+Tab as a shortcut because if I use Control or Meta, it usually clash with the windows switcher of the OS. (In fact I do not get the key event at all in that case).

So I think I will stick to Shift-Tab by default and to go in reverse way you can always use arrows.

What do you think?

juliendelplanque avatar Apr 18 '19 19:04 juliendelplanque

To clarify, I was not suggesting it be Command (on MacOS) but Ctrl (they are two separate keys). On MacOS (as far as I know), it's Command-Tab to switch in the OS, right?

In Chrome, you can try on your Mac the combination of Ctrl-Tab to flip to the next Chrome tab. On my Windows 10 it works, and Shift-Ctrl-Tab flips to the tab to the left (reverse change).

Shift with tab is really a solid behavior in the GUI, for like 20 years at least. Changing that will likely alienate a lot of users. It is half the reason I wrote the feature request in the first place :-)

On Thu, 18 Apr 2019 at 21:08, Julien Delplanque [email protected] wrote:

@fuhrmanator https://github.com/fuhrmanator The thing is, I choose Shift+Tab as a shortcut because if I use Control or Meta, it usually clash with the windows switcher of the OS. (In fact I do not get the key event at all in that case).

So I think I will stick to Shift-Tab by default and to go in reverse way you can always use arrows.

What do you think?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/juliendelplanque/Mirage/issues/17#issuecomment-484646359, or mute the thread https://github.com/notifications/unsubscribe-auth/AB2BCDFAR4KWEEBK652DEYLPRDBJPANCNFSM4G7AO7UQ .

-- Christopher Fuhrman, P.Eng., PhD

Professeur au Département de génie logiciel et des technologies de l'informationÉTS (École de technologie supérieure)

http://www.etsmtl.ca/ http://profs.etsmtl.ca/cfuhrman +1 514 396 8638 L'ÉTS est une constituante de l'Université du Québec Avis de confidentialité L'information contenue dans ce message électronique ainsi que dans les fichiers qui peuvent y être joints est de nature confidentielle et destinée à l'usage exclusif du destinataire. Si ce message vous est parvenu par erreur ou que vous n'êtes pas le destinataire visé, vous êtes par la présente avisé que tout usage, copie ou distribution de l'information contenue dans ce message est strictement interdit et vous êtes prié d'en aviser [email protected] et de détruire ce message. Confidentiality Notice This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify [email protected]. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.

fuhrmanator avatar Apr 19 '19 08:04 fuhrmanator

As Mirage has sadly withered with subsequent versions of Pharo - just adding a note for anyone interested in Window's like flipping that I looked at what it would take to revive Mirage and decided that it was a bit more than I could realistically grok in an evening - but while doing so I understood enough about how to register a global keyboard shortcut and how there is a list of windows for the task toolbar and so I put those together into a simple project - https://github.com/macta/PharoFlipper which gives ^tab like behaviour via the ^1 shortcut. Its very basic and not as lovely as Mirage was, but hopefully it can help anyone else and maybe Mirage can be reborn.

macta avatar Feb 07 '24 08:02 macta