avahe-kellenberger / nimdow

A window manager written in Nim (In Development)
GNU General Public License v2.0
319 stars 19 forks source link

Modes for Mouse and Keyboard to prevent unnatural cursor behavior #171

Open avahe-kellenberger opened 3 years ago

avahe-kellenberger commented 3 years ago

From @PMunch :

I feel like you could track two "input modes" that would make it feel more natural. Based on the last action you're either in "mouse mode" or "keyboard mode". If you have moved the mouse or clicked anything you're in "mouse mode" and if you have triggered a keyboard shortcut you're in "keyboard mode". This would mean that if I spawn the menu to spawn a program through a keyboard shortcut the mouse would move there. But if I'm moving the mouse around and a window appears for some reason (looking at you Steam, with you're horribly delayed window creation), then the mouse won't suddenly jump out from under you. I think that this would feel very natural, and would solve this issue as well (which is an issue of what feels natural or not). I actually implemented a small thing when I was using i3 that allowed me to do Super+Mouse button to spawn a small circular menu under the mouse that would allow me to run different things. This would feel awkward if the mouse moved around, so if you ever implement keyboard+mouse button shortcuts I think those should count as "mouse mode".