Making CapsLock a Unique Modifier

I would like to use Caps Lock as its own UNIQUE modifier key (not merely replace it with Ctrl). I have figured out how to do this on windows but not yet in Ubuntu. Here is what I'm looking for:

  1. When I press "Caps Lock" on its own, it is equivalent to the Escape key (or at least sends the "escape" command).
  2. When I press Caps Lock + <new key>, it does other stuff.

I have figured out how to get EITHER ONE of these to work, but not both at the same time. For example, I have figured out how to turn Caps Lock into the unique "Super" modifier using xbindkeys and xmacro (this achieves #2). I have also figured out how to switch the escape and capslocks keys altogether to achieve #1. But I can't figure out how to get both outcomes at the same time!

Any advice?

ESC+other stuff? It sounds like you're trying to make capslock into the META key(which is what is emulated by ESC+combo on a PC keyboard). Try making it the META key, not the super key, and see if key combos start working then.

When I make CapsLock an additional escape key, I am not able to bind CapsLock + <other keys> to anything. It just doesn't work in either xbindkeys or the Ubuntu GUI for binding buttons.

Any other suggestions or tips on what I might be doing wrong? For example, I am trying to make:

CapsLock + k = launch firefox
CapsLock = Escape

I know how to do both independently but not together and it's driving me nuts! :confused: