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

Neo Mousekeys' grid only accepts wasd, not hjkl #1

Open
brimwats opened this issue Jan 24, 2024 · 22 comments
Open

Neo Mousekeys' grid only accepts wasd, not hjkl #1

brimwats opened this issue Jan 24, 2024 · 22 comments

Comments

@brimwats
Copy link

Setttings:

# Grid is enabled with g, disabled with g or esc.
# Press direction keys to shrink the grid in one direction.
normal-mode.to.grid-mode=+grid
grid-mode.to.normal-mode=+grid | +esc
grid-mode.to.idle-mode=+exit
grid-mode.grid.area=active-screen
grid-mode.grid.area-width-percent=0.99
grid-mode.grid.area-height-percent=0.99
grid-mode.grid.synchronization=mouse-follows-grid-center
grid-mode.grid.line-visible=true
grid-mode.grid.line-color=#FF0000
grid-mode.shrink-grid.up=+up
grid-mode.shrink-grid.down=+down
grid-mode.shrink-grid.left=+left
grid-mode.shrink-grid.right=+right

# Hints are enabled with f, disabled with f or esc.
# Holding leftshift while selecting the hint will trigger a second hint pass with a smaller hint grid
# centered around the mouse to refine the position.
normal-mode.to.hint1-mode=+hint
hint1-mode.to.normal-mode=+esc | +backspace
hint1-mode.to.idle-mode=+exit
hint1-mode.hint.type=grid
hint1-mode.hint.grid-area=active-screen
hint1-mode.hint.active-screen-grid-area-center=screen-center
hint1-mode.hint.grid-cell-width=72
hint1-mode.hint.grid-cell-height=40
hint1-mode.hint.undo=backspace
hint1-mode.hint.mode-after-selection=normal-mode

hint1-mode.to.hint2-1-mode=+slow
# leftshift (slow key) is already pressed in slow mode.
slow-mode.to.hint2-1-mode=+hint
hint2-1-mode.hint=hint1-mode.hint
hint2-1-mode.to.hint1-mode=-slow
hint2-1-mode.to.idle-mode=+exit
hint2-1-mode.hint.mode-after-selection=hint2-2-mode

hint2-2-mode.to.idle-mode=+exit
hint2-2-mode.to.hint1-mode=+backspace
hint2-2-mode.to.normal-mode=+esc
hint2-2-mode.hint=hint1-mode.hint
hint2-2-mode.hint.type=grid
hint2-2-mode.hint.grid-area=active-screen
hint2-2-mode.hint.active-screen-grid-area-center=mouse
hint2-2-mode.hint.grid-max-row-count=4
hint2-2-mode.hint.grid-max-column-count=5
hint2-2-mode.hint.grid-cell-width=22
hint2-2-mode.hint.grid-cell-height=17
hint2-2-mode.hint.selection-keys=h j k l ; a s d f g q w e r t y u i o p z x c v b
hint2-2-mode.hint.font-size=8
hint2-2-mode.hint.mode-after-selection=normal-mode

in vscode everything after ; is greyed out, but editing doesn't seem to do anything.
image

trying to use hjkl in grid mode but only wasd works there. Any ideas?

@petoncle
Copy link
Owner

petoncle commented Jan 24, 2024

Hi @brimwats, thanks for the feedback.

If you want to change the grid keys which are currently the same as the move keys (wasd), then you need to change this part:

grid-mode.shrink-grid.up=+up
grid-mode.shrink-grid.down=+down
grid-mode.shrink-grid.left=+left
grid-mode.shrink-grid.right=+right

to:

grid-mode.shrink-grid.up=+k
grid-mode.shrink-grid.down=+j
grid-mode.shrink-grid.left=+h
grid-mode.shrink-grid.right=+l

The part that you've tried to change is related to the hints, and it does not affect the grid.

Some more explanation

At the top of the configuration, some key aliases are defined. For example, we have:

key-alias.up=w

That means that any reference to up later on in the configuration will be replaced by w. You can see that up, down, left and right are used by the mouse movement commands as well as the grid commands. So, when we say:

grid-mode.shrink-grid.up=+up

It is equivalent to saying:

grid-mode.shrink-grid.up=+w

The + in +up means key press event. In other words, the shrink grid up command (which shrinks the grid in the upward direction) will be triggered whenever there is a key press event corresponding to up (which is an alias mapped to the w key).

@brimwats
Copy link
Author

brimwats commented Jan 24, 2024

Ahhh that was an obvious one I missed! Thank you for pointing that out! I hope it's at least helpful for documentation writing

While i'm here though, am I right in (now) understanding that the hint2-2-mode.hint.selection-keys=h j k l ; a s d f g q w e r t y u i o p z x c v b is for the hints that appear on the screen after pressing f?

edit: nope, it's for the smaller grid that appears after pressing shift on the first round of F!

I tried modifying that line to see if I could get it to be only keys that appear on the right hand side of a spit keyboard (i've mapped moustmaster to a razer tartarus with good success, but it didn't seem to work so I mist have misunderstood again!

@brimwats
Copy link
Author

It's probably worth mentioning that my original confusion happened because of the line in the documentation that says "Shrink the grid in one direction with h, j, k, l."; it sounds like it actually is w a s d unless set in the aliases, yes?

@petoncle
Copy link
Owner

petoncle commented Jan 24, 2024

I hope it's at least helpful for documentation writing

Definitely. Thank you so much for asking those questions and sharing your feedback!

You're correct about the hints. In the neo-mousekeys configuration I have implemented 2-pass hints. The second pass is optional and is for refining the mouse position further in case the first hint pass was not precise enough. Like you've discovered, the second pass is triggered if you hold leftshift while selecting the hint of the first pass.

i've mapped moustmaster to a razer tartarus

Interesting keyboard, I'll have to look into it!

It's probably worth mentioning that my original confusion happened because of the line in the documentation that says "Shrink the grid in one direction with h, j, k, l."; it sounds like it actually is w a s d unless set in the aliases, yes?

You are 100% correct, I made a mistake in the documentation. That configuration is supposed to use wasd for both mouse movement and grid shrinking (no hkjl), but I got it wrong in the documentation. Sorry about that. I will fix it now. Thanks!

By the way, I'm not personally using this configuration (neo-mousekeys) but I believe it is appropriate for most people, that's why I present it as the recommended configuration. The fact that I'm not using it also means that I have not spent as much time fine tuning it as I did for my personal configuration.
Besides potential bugs in this configuration, there are things that could be improved. Two examples:

  1. In my personal config, I have a way to choose if I want the grid to cover the entire screen or the active window. Currently in the neo-mousekeys config, the grid can only cover entire screen. I actually use the active window grid quite a lot, so it may be a good idea to add it into the neo-mousekeys config. I think I'd need to hear about other people's thoughts.
  2. In my personal config, the hint mode is more advanced: I can do things like select a hint then automatically trigger a left button click.

If you have any suggestions for improving that configuration, let me know.

Anyway, thanks again for the feedback! ❤️

@petoncle
Copy link
Owner

I tried modifying that line to see if I could get it to be only keys that appear on the right hand side of a spit keyboard (i've mapped moustmaster to a razer tartarus with good success, but it didn't seem to work so I mist have misunderstood again!

I missed replying to that. Did you manage to change the hint keys for the first hint pass?

@brimwats
Copy link
Author

You're correct about the hints. In the neo-mousekeys configuration I have implemented 2-pass hints. The second pass is optional and is for refining the mouse position further in case the first hint pass was not precise enough. Like you've discovered, the second pass is triggered if you hold leftshift while selecting the hint of the first pass.
...
I missed replying to that. Did you manage to change the hint keys for the first hint pass?

No matter what they're changed to it doesn't seem to affect the grid. I still see this;

image

By the way, I'm not personally using this configuration (neo-mousekeys) but I believe it is appropriate for most people, that's why I present it as the recommended configuration.

I think a wasd configuration is the correct for most people, yeah. However, as you note

The fact that I'm not using it also means that I have not spent as much time fine tuning it as I did for my personal configuration. Besides potential bugs in this configuration, there are things that could be improved. Two examples:

  1. In my personal config, I have a way to choose if I want the grid to cover the entire screen or the active window. Currently in the neo-mousekeys config, the grid can only cover entire screen. I actually use the active window grid quite a lot, so it may be a good idea to add it into the neo-mousekeys config. I think I'd need to hear about other people's thoughts.

There are some issues like this on a vertical screen:
image

  1. In my personal config, the hint mode is more advanced: I can do things like select a hint then automatically trigger a left button click.

This would be fantastic! As it stands I currently use Fluent Search's screen search feature. The settings look like this:

image

Documentation: https://fluentsearch.net/posts/fluent-search-features-guide

Their code is open source iirc so maybe you can take some inspiration from that?

@petoncle
Copy link
Owner

petoncle commented Jan 28, 2024

Hi @brimwats,

Let me try to explain how hints work and from there we'll try to resolve the problems you've had.

In the neo-mousekeys config, there are 3 modes that define a hint grid: hint1-mode which is for single-pass hints, hint2-1-mode which is for the first pass of 2-pass hints, and hint2-2-mode which is for the second pass of 2-pass hints.

The hints are defined by a few things, mostly:

  1. The hint selection keys (customizable with hint.selection-keys=...), which, when unspecified, default to: a b c d e f g h i j k l m n o p q r s t u v w x y z
  2. The spacing between each hint defined indirectly via the size of the grid cells (customizable with hint.grid-cell-width and hint.grid-cell-height) which defaults to: 72 pixels (width) and 40 pixels (height).
  3. The maximum number of rows and columns (customizable with hint.grid-max-row-count and hint.grid-max-column-count) which defaults to: 26 and 26. The reason I've implemented a max number of rows and columns is for the second hint pass which is a smaller hint grid that needs only a few hints around the cursor.

The default values for 1., 2. and 3. allow me to get the following hint layout on a 1920x1080 screen:

AA BA ... YA ZA
AB BB ... YB ZB
...
AZ BZ ... YZ ZZ

Since your screen is vertical, these defaults don't work well, especially because of hint.grid-max-row-count=26 (you need more than 26 rows). That is why in your screenshot, only a portion of the screen is covered by hints. With the following settings, I could what get what you see in the screenshot below (vertical screen 1080x1920):

hint1-mode.hint.grid-max-row-count=45
hint1-mode.hint.grid-max-column-count=26
hint1-mode.hint.grid-cell-width=72
hint1-mode.hint.grid-cell-height=42

java_ik1tHyX60K

Let me know if that works for you.

Now, let's tackle the problem you have with changing the hint keys. We have 3 hint modes in the neo-mousekeys config:

  • hint1-mode doesn't specify which keys to use, and so it uses the default hint keys. That's equivalent to having this line in the config:
hint1-mode.hint.selection-keys=a b c d e f g h i j k l m n o p q r s t u v w x y z
  • hint2-1-mode inherits the properties of hint1-mode (the selection-keys will therefore be the same as hint1-mode's), that is the purpose of this line:
hint2-1-mode.hint=hint1-mode.hint
  • hint2-2-mode -- which is the smaller hint grid (second hint pass) -- uses the following hint keys:
hint2-2-mode.hint.selection-keys=h j k l ; a s d f g q w e r t y u i o p z x c v b

If you want to change the hint keys of the first pass, you should be able to do that by explicitly defining the selection keys of hint1-mode, like so:

hint1-mode.hint.selection-keys=q w e r t y 1 2 3 4 5

With this, both hint1-mode and hint2-1-mode will use the selection keys you specify.

As it stands I currently use Fluent Search's screen search feature.

For some reason I never heard of Fluent Search before. It looks very cool. I see that it does context-aware hints which has both benefits and drawbacks (when compared to "dumb hints" that cover the whole screen). Context-aware hints only show hints above actual app widgets (buttons, textboxes, menus, etc.) which reduces the clutter (no unnecessary hints), but on the other hand they don't always allow you to move the mouse exactly where you want it to move. That's the reason why I did not look into context-aware hints (yet).

For my reference: when selecting a hint in Fluent Search, you can press 1, 2, 3, or 4 to choose whether you want a left button click, double left button click, left button press and hold, or right button click. In mousemaster, we have the bricks we need to implement these purely in the configuration file, except for the double click: we have commands for pressing a mouse button and releasing it (PressLeft and ReleaseLeft), but we'd need something to trigger a double click.

In my config (which is optimized for a single hand usage), this is how I currently do clicking after selecting a hint: assuming there are a bunch of hints on the screen, if I want to select the one labelled HJ, then I press H then J which selects the hint, moves the mouse and presses the left mouse button. If I want to double click, I press H then J, then J a second time. Re-pressing the last hint key (J in the previous example) to click again fits my config well because it allows me to do double-clicking with one hand (I don't need to reach another key like 1/2/3/4). But I am wondering if the Fluent Search approach (press another key like 1/2/3/4 before selecting the hint to choose what kind of click behavior you want) would be better for the recommended mousemaster config. If you have any comment/suggestion about that, let me know.

Question for you @brimwats: how do you feel about the default normal-mode activation combo (ctrl + e)? I know that it's not ideal since many apps use that combo. I'm also wondering if we need a combo to go directly to grid mode and hint mode. Currently, if you want to go to grid mode you need to first go to normal mode (ctrl + e), then grid mode (g), which is not ideal (same for hint mode: ctrl + e, then f).

As always, thank you for the very useful feedback, and for introducing me to Fluent Search.

@brimwats
Copy link
Author

brimwats commented Feb 10, 2024

=Sorry for the delay! I wanted to get some experience using the app!

First a couple of questions!

  1. I wanted an indicator for when MM was not active, so I added a couple lines to the config:
idle-mode.to.normal-mode=_{leftctrl} +e
idle-mode.indicator.enabled=true
normal-mode.indicator.enabled=true
idle-mode.indicator.mouse-press-color=#b0b0b0
idle-mode.indicator.idle-color=#b0b0b0
normal-mode.indicator.idle-color=#00ff00
normal-mode.indicator.move-color=#ff00ff
normal-mode.indicator.mouse-press-color=#FF0000

I wanted it to be grey. However there is some blue flickering when I type that I cant figure out where it is coming fyorom:

vivaldi_ItkHPY7siW


Now your questions!

  1. This
hint1-mode.hint.grid-max-row-count=45
hint1-mode.hint.grid-max-column-count=26
hint1-mode.hint.grid-cell-width=72
hint1-mode.hint.grid-cell-height=42

works on both a vertical and horizontal screen well!

  1. setting hint1-mode.hint.selection-keys=7 8 9 0 y u i o p h j k l n m works for when i use the razer and better generally. I haven't tried [ ] ; ' , . / would those be accepted?

But I am wondering if the Fluent Search approach (press another key like 1/2/3/4 before selecting the hint to choose what kind of click behavior you want) would be better for the recommended mousemaster config. If you have any comment/suggestion about that, let me know.

I haven't used the multi click features of FS too much, generally I just use it to jump from one screen to another (you hit shift and it switches to another screen. To give you an idea of what I have, I have a 27" landscape middle screen, a 24" lanscape screen above it and 2x vertical 24" screens to the left and right. A lot of screenspace! A key to jump to the next/previous monitor in this context would be good. Here's how DisplayFusion does it: (I don't know what code they use to do this, but it's s scripted function within DF)

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
	public static void Run()
	{
		BFS.DisplayFusion.RunFunctionAndWait("Move Mouse Cursor to Next Monitor");
		BFS.DisplayFusion.RunFunctionAndWait("Move Mouse Cursor to Center of Current Monitor");
	}
}
  1. Otherwise, so far m y biggest pain point with ctrl-e MM switching on and off is that I will often start typing and forget MM is active. I haven't checked the documentation to see if it can be autodisabled when (f.ex.) I switch to vivaldi, which has vimium-c and doesn't need MM. I also feel like the ctrl-e hotkey should be a toggle to turn it on and off, not just a on button. I currently have key-alias.exit=q p set and the q is a much better quit setting for qwerty imo. I need to explore the settings a bit more but I'm in the middle of a big move so havent and I apologize if any of this is needless info!

as far as other programs, it only bothers me in word (center text) and so I have to go crtl e ctrl e q and Directory Opus, but I just changed the dopus setting.

oh yes! 5.

I'm also wondering if we need a combo to go directly to grid mode and hint mode. Currently, if you want to go to grid mode you need to first go to normal mode (ctrl + e), then grid mode (g), which is not ideal (same for hint mode: ctrl + e, then f).

I don't feel like it's burdensome, but I recognize lots of other people will want these

@petoncle
Copy link
Owner

petoncle commented Feb 10, 2024

Hello!

  1. I wanted an indicator for when MM was not active, so I added a couple lines to the config (...) However there is some blue flickering when I type that I cant figure out where it is coming from

Ah! I had implemented something to change the color of the indicator when a key unhandled by mousemaster is being pressed. This is exactly what happens when you type. I realize now that this feature is weird and can be confusing. I should probably not make the default do that? By default, when pressing an unhandled key, the indicator color changes to blue:

idle-mode.indicator.unhandled-key-press-color=#0000FF
  1. setting hint1-mode.hint.selection-keys=7 8 9 0 y u i o p h j k l n m works for when i use the razer and better generally. I haven't tried [ ] ; ' , . / would those be accepted?

Yes [ ] ; ' , . / would work too (I've just tried it). Do you think I should change it in the neo-mousekeys configuration to 7 8 9 0 y u i o p h j k l n m? What about the second pass of the hint selection with the smaller hint grid?

  1. I haven't used the multi click features of FS too much, generally I just use it to jump from one screen to another (you hit shift and it switches to another screen.

What we can do right now in mousemaster is defining a screen hint selection mode. It would be a mode where one giant hint is displayed on each screen, like so:
java_ZE2NKpPpt0

It would be easy to add to the neo-mousekeys configuration. I just need to figure out what would be the best way to enter that screen selection mode. Should it be enterable from the idle mode, or from the normal mode (i.e. after pressing ctrl + e), or both? And then, what key/key combo to use to enter it? Any ideas 🤔?
Would that work, or do you think it would still be inferior to cycling through screens? I could also try to implement a new cycle-through-screens command (next/previous screen).

  1. Otherwise, so far m y biggest pain point with ctrl-e MM switching on and off is that I will often start typing and forget MM is active. I haven't checked the documentation to see if it can be autodisabled when (f.ex.) I switch to vivaldi, which has vimium-c and doesn't need MM.

That's an excellent point. The idea would be to auto-disable when specific programs (e.g. firefox.exe or vivaldi.exe) are active. I'll need to think about it and see if I can implement it.

  1. I also feel like the ctrl-e hotkey should be a toggle to turn it on and off, not just a on button.

That can be done easily. I should add it to the neo-mousekeys configuration. Basically, replace:

normal-mode.to.idle-mode=+exit | -clickthendisable

with:

normal-mode.to.idle-mode=+exit | -clickthendisable | _{leftctrl} +e

With that you could use leftctrl + e to turn it off.

  1. I currently have key-alias.exit=q p set and the q is a much better quit setting for qwerty imo.

Ok, I will change the current exit keys (capslock and p) to q and p.

  1. as far as other programs, it only bothers me in word (center text) and so I have to go crtl e ctrl e q and Directory Opus, but I just changed the dopus setting.

If you have any suggestions for replacing ctrl + e with something better, I'm all ears! Maybe something very simple like just press and release ctrl? Maybe a key combo that uses alt instead of ctrl? We can do advanced key combos like pressing a key twice in a row, or pressing a key for a minimum amount of time. I worked hard on key combos so that anything can be done, really.

I need to explore the settings a bit more but I'm in the middle of a big move so havent and I apologize if any of this is needless info!

I only see useful info here 😊. Thanks so much for the feedback!

@brimwats
Copy link
Author

brimwats commented Feb 11, 2024

Do you think I should change it in the neo-mousekeys configuration to 7 8 9 0 y u i o p h j k l n m? What about the second pass of the hint selection with the smaller hint grid?

imo def no, most people would want the range you have right now. I think the second pass is the sane and reasonable choice for most people; if you want a smaller selection using just the home row asdfghjkl; would make the most sense

2,

idle-mode.indicator.unhandled-key-press-color=#0000FF

works perfect!

What we can do right now in mousemaster is defining a screen hint selection mode. It would be a mode where one giant hint is displayed on each screen, like so:

WOW that is SO COOL i love it! that's just a neat feature in general! big +1 from me

. I just need to figure out what would be the best way to enter that screen selection mode. Should it be enterable from the idle mode, or from the normal mode (i.e. after pressing ctrl + e), or both? And then, what key/key combo to use to enter it? Any ideas 🤔?

This is where we run into limitations with common hotkeys! I think crtl+alt letter is what most programs are doing these days as microsoft and others take over more of the standard ctrl + letter keys. so what about ctrl + alt g for "grid" and c+a+h for hint? ctrl + e seems like a good fit for a default (imo) as I use quite a lot of hotkeys and for only DOPUS and Word to be using ctrl e is pretty good.

If you ever want a peep at programs defaults, get an account at https://keycombiner.com (free) and poke around their big program libraries (like word, vscode, etc).

That's an excellent point. The idea would be to auto-disable when specific programs (e.g. firefox.exe or vivaldi.exe) are active. I'll need to think about it and see if I can implement it.

Seems the solution (for me, with my incredibly limited knowledge) would be something like what Alt+Snap or others do (aka using Autohotkey window types using Window Spy (https://amourspirit.github.io/AutoHotkey-Snippit/WindowSpy.html). So here's what that looks like in AHK for a script that only runs on a matching window

; Auto-execute section.
Hotkey, %f_Hotkey%, f_Jump2ActivePath
;Hotkey, %f_HotkeyCombo%, f_Jump2ActivePath
return 

f_Jump2ActivePath:
;validate the correct dialogue type
WinGet, f_window_id, ID, a
WinGetClass, f_class, a
; Don't display menu unless it's a dialog or console window
if f_class not in #32770,ConsoleWindowClass
return

normal-mode.to.idle-mode=+exit | -clickthendisable | _{leftctrl} +e

Will give it a spin!

@petoncle
Copy link
Owner

petoncle commented Feb 11, 2024

I've implemented some of the things we've been talking about:

  1. Made leftctrl + e toggle normal mode on and off.
  2. Changed deactivation keys to q and p.
  3. Defined a screen selection mode (c in normal mode). I'm not too sure if c is the best choice.
  4. Ensured screens are sorted by position for all-screens hints determinism.

1., 2., and 3. are purely configuration changes (see what changed in neo-mousekeys.properties for the new screen selection mode).
4. is a code change that will require you to download the new mousemaster.exe executable.

I've also updated the neo-mousekeys documentation:

neo-mousekeys layout

@brimwats
Copy link
Author

This is so great! It is working well initially, take it for more of a spin over this week.

Thinking through other features that all layouts might be able to use; I'm not sure how 'smart' the commands are, but potential ideas:

  1. a button that goes to the middlle of the current window's frame and grabs it (for moving/dragging)
  2. does MM know where the min max close ➖⏹️✖️ buttons are? those are pretty common buttons that would make sense to have as "default optional" items.

@petoncle
Copy link
Owner

petoncle commented Feb 13, 2024

This is so great! It is working well initially, take it for more of a spin over this week.

Good to hear! Let me know how it goes!

Thinking through other features that all layouts might be able to use; I'm not sure how 'smart' the commands are, but potential ideas:
1. a button that goes to the middlle of the current window's frame and grabs it (for moving/dragging)

I think I'm able to do something like that in my config. I can snap the cursor to the active window's center and edges, and for the top edge I've used an inset so that the cursor lands inside the window's title bar (and not right on the edge). It looks like this:

java_RLSRtDqcg0.mp4

Is that roughly what you are talking about?

Note: in this video, I grab the edges and then move them around (resize) using the grid mode. I also select the title bar and move it around using the grid mode. It's of course possible to not use the grid mode and move the cursor without it. (Oh and in this video, green indicator means I'm pressing a button, red indicator means I'm not pressing anything).

  1. does MM know where the min max close ➖⏹️✖️ buttons are? those are pretty common buttons that would make sense to have as "default optional" items.

Unfortunately, it doesn't know about where these buttons are. However, Windows has built-in shortcuts which I personally use all the time to minimize/maximize/close a window, not sure if they're good for you too?

  • Minimize: alt + space, then n
  • Maximize: alt + space, then x
  • Restore (i.e. undo a maximize): alt + space, then r
  • Close: alt + space, then c (or alt + f4)

@brimwats
Copy link
Author

So bad news for the ctrl-e command.

https://www.windowscentral.com/software-apps/windows-11/windows-11-build-26052-everything-you-need-to-know
The new option allows you to ask Copilot directly to help you understand programming code, log files, or any selected text without extracting the extra steps of copying, opening Copilot, and pasting the text in the prompt. The feature integration even offers the "Ctrl + E" keyboard shortcut to send the content directly to Copilot.

Microsoft is starting to use that (notepad and some other windows apps only right now)

I think I'm able to do something like that in my config. I can snap the cursor to the active window's center and edges, and for the top edge I've used an inset so that the cursor lands inside the window's title bar (and not right on the edge). It looks like this:

omg that is extremely cool! yes, that's exactly what I was thinking of

Unfortunately, it doesn't know about where these buttons are. However, Windows has built-in shortcuts which I personally use all the time to minimize/maximize/close a window, not sure if they're good for you too?

🤯🤯 it has been a long time since someone has told me a shortcut I didn't know about, and to find out about alt+space this way! I've been using that for a long time for quick launchers like karabiner, fluid, launchy, and listary. Now I have to do some thinking about if I keep it as "search apps" for fluent or not!

I've had some success combining Alt+Snap https://github.com/RamonUnch/AltSnap with mousemaster, in case you were curious about tools that can be used with MM!

@petoncle
Copy link
Owner

petoncle commented Feb 14, 2024

So bad news for the ctrl-e command.

https://www.windowscentral.com/software-apps/windows-11/windows-11-build-26052-everything-you-need-to-know
The new option allows you to ask Copilot directly to help you understand programming code, log files, or any selected text without extracting the extra steps of copying, opening Copilot, and pasting the text in the prompt. The feature integration even offers the "Ctrl + E" keyboard shortcut to send the content directly to Copilot.

Microsoft is starting to use that (notepad and some other windows apps only right now)

Good catch! I always thought Ctrl + E was not ideal for mousemaster. I could definitely not use it myself as it's a default key combo in my IDE (IntelliJ) which I use dozens of times a day.

I think I'm able to do something like that in my config. I can snap the cursor to the active window's center and edges, and for the top edge I've used an inset so that the cursor lands inside the window's title bar (and not right on the edge). It looks like this:

omg that is extremely cool! yes, that's exactly what I was thinking of

Great. I'm trying to think of an ergonomic/intuitive way to introduce it in the neo-mousekeys config. Maybe a key that you press and hold (kind of like the jump key J). As soon as you press it, the cursor moves to the center of the active window. Then, while still holding that key, you can snap the cursor to the edges of the window using the direction keys. Or maybe a separate key for moving to the center of the active window (kind of like the current H key). But we're running out of available keys 🤔.

Unfortunately, it doesn't know about where these buttons are. However, Windows has built-in shortcuts which I personally use all the time to minimize/maximize/close a window, not sure if they're good for you too?

🤯🤯 it has been a long time since someone has told me a shortcut I didn't know about, and to find out about alt+space this way! I've been using that for a long time for quick launchers like karabiner, fluid, launchy, and listary. Now I have to do some thinking about if I keep it as "search apps" for fluent or not!

Isn't Karabiner macOS only? Never heard of fluid and listary before, I'll look them up!

I've had some success combining Alt+Snap https://github.com/RamonUnch/AltSnap with mousemaster, in case you were curious about tools that can be used with MM!

Looks very useful, I'm going to have to try it out. Thanks for sharing!

@petoncle
Copy link
Owner

petoncle commented Mar 7, 2024

Hi @brimwats, sorry for the delay! I've added a new window mode that does what we were talking about:

Window Mode (hold leftshift then press g in normal mode)

  • Move mouse to the active window's edges with direction keys.
  • Move mouse to the center of the active window with g.
  • Go back to normal mode by releasing leftshift.

I'm not sure if these keys are intuitive or not for that feature, you tell me if you have a chance to try it.
It's purely a configuration change in neo-mousekeys.properties where a new mode (window-mode) has been added. I've also created a new release (v1.0.37) for this.

@brimwats
Copy link
Author

brimwats commented Mar 9, 2024

Thanks! Cant wait to try it out. FYI that something in this release is triggering Defender:
image

@brimwats
Copy link
Author

brimwats commented Mar 9, 2024

First initial feedback!

I think these

hint1-mode.hint.selection-keys=7 8 9 0 y u i o p h j k l n m
hint2-2-mode.hint.selection-keys=y u i o p h j k l ; n m
screen-selection-mode.hint.selection-keys=j k l ; a s d f g

(or whatever their default values) should be in the top of the config file bc otherwise folks will have to go through the new config file side by side with the old one

@petoncle
Copy link
Owner

petoncle commented Mar 9, 2024

Thanks! Cant wait to try it out. FYI that something in this release is triggering Defender:

Thanks for letting me know. Very strange, my Windows doesn't complain about it.
I've sent it to VirusTotal for analysis, the results look fine (2/73).

I'm not sure what is triggering the alert you got. The good thing is that the mousemaster.exe build from the release page is fully automated and run on GitHub's VMs (it's not built from my machine). There would need to be malicious code in the code repository for it to end up in mousemaster.exe.

@brimwats
Copy link
Author

brimwats commented Mar 9, 2024

Yeah I'm not worried about it, more an FYI for you in case others report it!

@brimwats
Copy link
Author

brimwats commented Mar 9, 2024

Window Mode (hold leftshift then press g in normal mode)

This doesn't work.. I suspect because g is taken by grid and there's no window-mode key-alias?

key-alias.grid=g
key-alias.hint=f

edit: ah! got it, it wasn't clear that WASD were the keys I should be pressing (I read direction keys as arrow keys!

@petoncle
Copy link
Owner

petoncle commented Mar 9, 2024

Window Mode (hold leftshift then press g in normal mode)

This doesn't work.. I suspect because g is taken by grid and there's no window-mode key-alias?

key-alias.grid=g
key-alias.hint=f

edit: ah! got it, it wasn't clear that WASD were the keys I should be pressing (I read direction keys as arrow keys!

Ah yes, you're right, that part is unclear.

I think these

hint1-mode.hint.selection-keys=7 8 9 0 y u i o p h j k l n m
hint2-2-mode.hint.selection-keys=y u i o p h j k l ; n m
screen-selection-mode.hint.selection-keys=j k l ; a s d f g

(or whatever their default values) should be in the top of the config file bc otherwise folks will have to go through the new config file side by side with the old one

Good point too.

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

2 participants