Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows-like flipping #17

Open
fuhrmanator opened this issue Mar 17, 2019 · 13 comments
Open

Windows-like flipping #17

fuhrmanator opened this issue Mar 17, 2019 · 13 comments

Comments

@fuhrmanator
Copy link

fuhrmanator commented Mar 17, 2019

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.
@macta
Copy link
Contributor

macta commented Mar 18, 2019

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).

@juliendelplanque
Copy link
Owner

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. :-)

@macta
Copy link
Contributor

macta commented Apr 11, 2019

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

@fuhrmanator
Copy link
Author

fuhrmanator commented Apr 11, 2019 via email

@juliendelplanque
Copy link
Owner

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
Copy link
Owner

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!

@macta
Copy link
Contributor

macta commented Apr 15, 2019

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

@fuhrmanator
Copy link
Author

fuhrmanator commented Apr 15, 2019

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
Copy link
Author

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
Copy link
Author

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!

@juliendelplanque
Copy link
Owner

@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?

@fuhrmanator
Copy link
Author

fuhrmanator commented Apr 19, 2019 via email

@macta
Copy link
Contributor

macta commented Feb 7, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants