Set single key binding except for text inputs

I would like to use CUA bindings with some custom key bindings added. For example, I would like to bind f to follow-hint. This is my config so far:

(define-configuration base-mode
  "Bind some custom keys in CUA map."
    (keymaps:define-keyscheme-map "custom" (list :import %slot-value%)
       "f" 'nyxt/mode/hint:follow-hint
       "F" 'nyxt/mode/hint:follow-hint-new-buffer
       "{" 'previous-heading
       "}" 'next-heading
       "b" 'switch-buffer)))))

Now I can’t enter these characters in (HTML) text areas anymore. In a similar question, a user was told to use vi keybindings to get modal behavior. But on the other hand: With CUA key bindings, I can jump to the next heading with n but it works still as a simple letter input in text areas. How can I get the same behavior for my custom (single-key) bindings?

Indeed the only modal keyscheme is vi. And I’d say it’s the one that suits your goal best.

In my opinion, all keyschemes should be modal because the web is inherently modal.

Could you open an issue on GitHub with a precise recipe to reproduce it? Thanks!

Sure! See