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

Imposible to remap <Shift-Enter> in ominbar #2174

Open
goldlil opened this issue Oct 7, 2024 · 0 comments
Open

Imposible to remap <Shift-Enter> in ominbar #2174

goldlil opened this issue Oct 7, 2024 · 0 comments

Comments

@goldlil
Copy link

goldlil commented Oct 7, 2024

Seems like it is impossible to remap some other action to perform , or in omnibar.

api.cmap('<ArrowRight>', '<Shift-Enter>'); -> this does not work while api.cmap('<ArrowRight>', '<Shift-Tab>'); works correctly.

I have been looking through implementation a bit and seems that this values are hardcoded and not remappable. Or maybe there is a way to remap this through some custom script.

    function _onKeyDown(evt) {
       if (handler && handler.onKeydown) {
           handler.onKeydown.call(evt.target, evt) && evt.preventDefault();
       }
       if (Mode.isSpecialKeyOf("<Esc>", evt.sk_keyName)) {
           front.hidePopup();
           evt.preventDefault();
       } else if (evt.keyCode === KeyboardUtils.keyCodes.enter) {
           handler.activeTab = !evt.ctrlKey;
           handler.tabbed = self.tabbed ^ evt.shiftKey;
           handler.onEnter() && front.hidePopup();
       } else if (evt.keyCode === KeyboardUtils.keyCodes.space) {
           self.expandAlias(self.input.value, '') && evt.preventDefault();
       } else if (evt.keyCode === KeyboardUtils.keyCodes.backspace) {
           self.collapseAlias() && evt.preventDefault();
       }
   }
   ```
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

1 participant