Skip to content

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

@ankisme

Description

@ankisme

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:

  1. mouse click on label of other layer, for example, the layer name is [layer ABC]
  2. pressing [Space + Left Mouse Button]
  3. then you will toggle the visible of [layer ABC]

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.

/// <reference types="@mapeditor/tiled-api" />

/* global tiled */

const dragLayer = tiled.registerAction("DragLayer", function (/* action */) {
	tiled.alert(`My desired shortcut is pressing [Ctrl + Left Mounse Button] to drag map,

	but current shortcut is pressing [Space + Left Mouse Button], and how to do it?`)
})
dragLayer.text = "DragLayer"
dragLayer.shortcut = "Space"

tiled.extendMenu("Layer", [
	{ action: "DragLayer", before: "SelectPreviousLayer" },
])

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIt's a feature, not a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions