-
Notifications
You must be signed in to change notification settings - Fork 150
Hotkey editor #129
Comments
I'm also a Dvorak user, and moving around in the scene viewer is a total pain. |
Hi! A hotkey editor would be nice indeed. If someone is up for it, the first step would be to come up with a design both in terms of user experience as well as an API for how plugins would interact with this hotkey editor! |
Hello, |
Looks like my first stab missed the mark as the keyCode edits in So my second approach would be to each plugin/module go ahead and defined custom hotkey constants that default to the original DOM_VK_ values if not previously set. As example, assuming keyEvent = window.KeyEvent; Camera3DControls could define something like: in ./systems/game/plugins/default/scene/editors/scene/ui.ts: |
i am seeing that each editor has its own window in a separate iframe, so there will be several instances of window.KeyEvent that exist. I would like to see about having only one instance of the KeyEvent and KeyEventCustom constants, perhaps moving them to window.parent ? |
On a separate issue, the current settings framework, each plugin can save its settings per project. For hotkey bindings, we may want to store these by plugin/client platform (Windows/OSX/Linux)/keyboardlayout/user |
I see that the documentation for hotkeys is generated from each plugin's jade doc. |
I am recording all the issues that I find related to hotkey on this thread, hope it's ok with everyone. Please let me know if it would be better to create separate issues, and if so, how to tag them to track them as a group. I also created a project on my own fork of superpowers to track the work I am currently doing https://github.com/ivanixgames/superpowers-core/projects/1 |
Just want to note that when using chrome browser on windows, there seems to be a few conflicts when using the Control hotkeys functions. The second issue is when in the Scene editor, Control-N will bring up a dialog asking for a name of a new actor, however, it is overcome by the "NEW ASSET" window which has to be canceled. This happens in both browser and app. Finally, the hotkey combo, Super(Windows) + N on windows also serves as a Control-N function for both popups. |
I would like to propose a single/global HotkeyManager object which the main app and plugins can use to register hotkey definitions, in turn it could help warn of potential conflicts. At a later time, we could then have a separate class/object called HotkeyEditor, perhaps as a plugin, which provides a UI to allow end user to customize hotkey definitions. In the meantime, end users could simply bring up the javascript console via F12 and call the HotkeyManager directly to set their desired keys and profiles. |
On a separate thought related to hotkeys, should we enable mouse button/wheels to be remapped? As example, I sometimes use Blender for 3D creations, so I am used to using the mouse wheel to zoom in and out of the scene. This also seems to work in SuperPowers Scene editor while in 2D mode, but not in 3D mode which requires use of defined hotkeys W and S. Maybe can address in detail at a later phase, but think about how to prepare code for this ability. |
in ./core/systems/game/SupEngine/src/Input.ts, current key modifiers defined are: As of DOM3, we should be able to distinguish location of key pressed, so I plan to extend as follows: DOM_VK_SHIFT_LEFT: 256, |
./core/SupClient/src/events.ts defines a few of the general Control hotkey sequences. It currently has hardcoded values. Would be nice if it could reference the same set of DOM_VK constants as defined in ./core/systems/game/SupEngine/src/Input.ts Since SupClient handles loading of plugins and systems, HotKeyManager and DOM_VK constants could be defined at its level and made available for event.ts. So I was thinking something like SupClient.HotKeyManager. However ...., SupClient does not exist in a published game, instead there are SupRuntime and SupEngine. SupCore is still present. Assuming it may be nice to allow hotkeys for games to be remapped, maybe SupCore.HotKeyManager would be better. |
@elisee Hello, I just submitted a couple of PR that demo my proposal for a HotKeyManager. The related PRs are |
I'm a DVORAK user and I having lot of troubles with the original hotkeys.
I know Dvorak user are rare, but this is a think that can help every one.
A simple hotkey editor or a easy way to edit in a file will be great.
The text was updated successfully, but these errors were encountered: