Question

Can you remap the CapsLock key in Keymando?

CapsLock is listed as an available key but when I try a test like:

map "<CapsLock-j>" { alert("CapsLock-j") }

... and hit Reload Config in the Keymando menu, I get an error dialog that says:

Error Parsing Keymando Config File

undefined method `ctrl' for nil:NilClass

Is there perhaps an abbreviation of CapsLock? For example, in the available keys, the Control key is just listed as Control but in the example code it is ctrl. Is there a similar abbreviation for CapsLock?

If possible, I would like to use the CapsLock key as a mode key to implement logic like:

if <CapsLock>
  map <j>, <Down>
  map <k>, <Up>
  # ...etc
end
Was it helpful?

Solution

Sorry, that's a mistake on our part listing Capslock on the website. Currently it can only be remapped to Control, Option, or Command via the Keyboard.prefPane under "Modifer Keys.." and there's no way for us right now to detect if it's been pressed.

We'll keep our eyes open for a solution but as of right now it's not going to do what you're wanting. Sorry.

The website has been fixed to avoid any more confusion, as well.

OTHER TIPS

While you can't remap capslock, you can achieve almost the same functionality by adding some basic state to your keymandorc file. I couldn't figure out how to map something to the option key alone, but apart from that, this should do what you are aiming for:

At the top of your keymandorc put:

@caps = false

Then down wherever you define your bindings put something like the following

map "j" do
  if @caps then
    send("<Down>")
  else
    send("j")
  end
end
map "<Option-v>" do
  @caps = !@caps;
  alert("Vim Mode: " + @caps.to_s)
end

You could then also bind escape to exit the mode if @caps is true, and so forth.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top