-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
The shortcut [Space + Left Mouse Button] have a bug. How to use [Ctrl + Left Mouse Button] instead of [Space + Left Mouse Button] to drag map? #3672
Comments
I use autohotkey and mapping F1 key to Middle Mouse Button, now it's more convient, though it's still not the best. |
Finally I use AutoHotKey to solve the problem, now I can use [Ctrl+LeftMouseButon] to dragging and also [Ctrl+Mouse Wheel] to zoom in and zoom out. I think it is much more better than [Space+LeftMouseButon] and [Ctrl+Mouse Wheel], and it also could fix the bug. Here is the AutoHotKey script
|
In general it would be nice to make mouse interaction customizable, but it is a lot more tricky than keyboard interaction due to the potential for conflicts. The Ctrl modifier is used by several tools in combination with Left Click, for example:
So when making Ctrl + Left Click perform panning, care would need to be taken not to break any of the existing interactions. Using a different key, like Space, or a different mouse button, like Middle Mouse Button, avoids all these conflicts. I do see the issue with toggling layer visibility, and I think maybe this could be improved by making the currently focused area more visible. As part of writing a new style (see #3597), I would like to make sure the focus is always clearly visible also for the views like layer list, tileset and map views. |
Now I know [Ctrl] is used by many tools, and [Ctrl+Left Click] may conflict other tools in some mode. Now it seems that the more clearly way is to forbid the functionality of toggle visible by [Space] key, because the [Space] key will conflict with [Space + Left Click] when focus on layer label. Maybe [V] key is better than [Space] key for toggle visible of current layer, because [V] is the first character of [Visible]. |
Yeah, actually Space for toggling layer visibility is a historical thing that was added back in 0de0f20 (Tiled 1.1.4) because some people had grown used to it. It had worked older versions of Tiled because visibility toggle was implemented as a checkbox and Space toggles checkboxes by default. Since 359dcb9 (Tiled 1.3.0) there is a global shortcut for toggling visibility of the selected layer(s), which is Ctrl+H, so the Space (and Ctrl+Space) shortcuts could probably just be removed. Of course, the problem will remain for any text inputs, but they are much more rare to be focused (most common might be the Console text input). |
This reverts commit 0de0f20. This shortcut was only provided for backwards compatibility, but it often conflicts with using Space for panning the map view and since 359dcb9 there are global shortcuts available for toggling layer visility and locked status, making this shortcut no longer necessary. See issue mapeditor#3672.
There still a little inconvient of [Space], because toggle visible by [Space] should be triggered only when [Space] be pressed up, and now it will be triggerred when [Space] pressed down. And if it's triggered when [Space] be pressed up, perhaps [Space] will not conflict with [Space + Left Click]. |
Why do you think it's preferable to toggle visibility on release rather than press? Usually shortcuts work on press. Although, in this particular case, the checkbox didn't actually toggle until space had been released.
If the space press is not handled, then the press will trigger the panning mode, and then the release is expected to end the panning mode, rather than (also) toggling layer visibility, I think. In any case, I've suggested the removal of this shortcut entirely in PR #3673. |
You are right, many key and shortcut key of OS is triggered on press, not release, such as [Win + R] [Alt + Tab] in windows, I forget it. |
This reverts commit 0de0f20. This shortcut was only provided for backwards compatibility, but it often conflicts with using Space for panning the map view and since 359dcb9 there are global shortcuts available for toggling layer visility and locked status, making this shortcut no longer necessary. See issue mapeditor#3672.
This reverts commit 0de0f20. This shortcut was only provided for backwards compatibility, but it often conflicts with using Space for panning the map view and since 359dcb9 there are global shortcuts available for toggling layer visility and locked status, making this shortcut no longer necessary. See issue #3672.
Is your feature request related to a problem? Please describe.
Current shorcut of dragging map [Space + Left Mouse Button] is hardly to use for me, because when I pressed the space key, it always do the wrong thing, such as toggle the visible of current layer, then I have to mouse click on the map to change focus.
The way to reproduce it:
And the space key is not easy to press for me, because it’s a big and long key on the keyboard. For me, the space key is convient to click once, but is not convient for pressing.
And I also don't want [middle mouse button], because the [middle mouse button] is convient for scroll, but is not convient for click.
Describe the solution you'd like
So I want to use [Ctrl + Left Mouse Button] instead of [Space + Left Mouse Button].
And I could not found any way to do this.
Here is my .ts extension script.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
The text was updated successfully, but these errors were encountered: