Search code examples
emacskeyboard-shortcutskey-bindings

How to set shift shortcut on emacs


I want to set a shift combo shortcut for my custom function like this.

(global-set-key (kbd "S-u") 'my-custom-function)

But when I complete this and click "shift + u", it report "U is undefined" error.


Solution

  • How about just (global-set-key "U" #'my-custom-function)

    Setting that binding will make it hard to type normally though, you will need to quoted insert every time you want to type a capital "U" unless you have done some modifications to your keys.