4

I am using Emacs and the Ctrl key position is a bit problematic.

The only solution I found is to make Caps-Lock as a additional Ctrl key. This is fine, but I also want the occasional use of Caps-Lock key. So my solution is to rebind Caps-Lock to double tap of Shift key.

My question is how to achieve it in both Windows and Linux?

Braiam
  • 1
  • 11
  • 47
  • 78
Archit
  • 913
  • 1
  • 10
  • 20
  • 3
    Surely this question has nothing to do with Emacs? For starters, a "double tap of Shift" is meaningless to Emacs. I presume that it must have some effect at some level on your system, but that must be something you'll have to deal with at the OS level. I strongly suspect you'd be better off turning this into two separate questions; one aimed at Linux and one aimed at Windows. – phils Jul 20 '14 at 11:53

1 Answers1

0

You could use autohotkey under windows. There seems to be an equivalent program for linux (autokey) but I've never used it.

This .ahk script should do the trick:

~SHIFT::
if (A_PriorHotkey <> "~SHIFT" or A_TimeSincePriorHotkey > 400)
{
    ; Too much time between presses, so this isn't a double-press.
    KeyWait, Esc
    return
}
Send {CapsLock}
return

Source: Detect a double key press in AutoHotkey [stackoverflow]

Community
  • 1
  • 1
fap
  • 663
  • 1
  • 5
  • 14