0

Some keybindings require you to type the ^ character (ie magit smerge) and for starters, on an UE AZERTY keyboard (which is a very bad layout design BTW) there are two of those, and they each input a different character.

One is for accentuating a letter, like this : êôû and the other is the right one: ^ obtained by pressing altGr+key so it's a sort of keybinding inception: A keybinding within a keybinding :)

Is there a way to replace the prefix char with a more accessible single keypress char altogether system-wide ?

2 Answers 2

1

Here's the function that sets the keybindings for magit-smerge. You can redefine the keybindings by copying and modifying the ^ in the define-key lines.

(defun magit-smerge-setup ()
  "Setup magit-smerge keybindings."
  (interactive)
  (define-key magit-hunk-section-map (kbd "C-c ^ l") #'magit-smerge-keep-lower)
  (define-key magit-hunk-section-map (kbd "C-c ^ u") #'magit-smerge-keep-upper))
1

Does this do what you want, where X is whatever single key you want?

(define-key key-translation-map (kbd "^") (kbd "X"))

But what you really want probably depends on which keymap ^ is bound as a prefix key in. Your question doesn't provide any context.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.