0

I'm trying to use event-apply-super-key-modifier but I receive an error. I mapped capslock as f13, with autohotkey; it works. Now, I want to apply super modifier to f13 key with (global-set-key (kbd "<f13>") 'event-apply-super-key-modifier) So, when I press capslock, I receive: Wrong type argument: commandp, event-apply-super-key-modifier. I'm using emacs 25.1.1 maybe as changed use of this function?

If this is not possible to apply, I would use capslock key as modifier. I can define prefix command to bind this key on a map. My problem is that I want capslock key acts as a modifier only if it is pressed in conjunction with an other key. If it is pressed and released, I want an other behaviour. Can I instruct emacs in this direction? Thanks!

Randy Morris
  • 39,631
  • 8
  • 69
  • 76
Germano Carella
  • 473
  • 6
  • 14

1 Answers1

0

As the error is telling you, event-apply-super-key-modifier is not a command (and therefore cannot be bound to a key, because only commands may be bound to keys in a normal keymap).

You can still do what you want, though. See https://stackoverflow.com/a/27419718 regarding the special-purpose 'translation keymaps', and how you can write such a binding.

Community
  • 1
  • 1
phils
  • 71,335
  • 11
  • 153
  • 198