Carnac, Keystroke Visualization in Windows.

scinart posted @ 2013年5月25日 20:21 in software with tags keystroke visualization software , 2346 阅读

Hi, I'm Scinart, and today I'll recommand a great software for keystroke visualization, Carnac.

you can get it from https://github.com/Code52/carnac

Carnac is a keyboard logging and presentation utility for presentations, screencasts, and to help you become a better keyboard user.

Carnac is a free and open source software under Microsoft Public License (MS-PL), which means you are definitely free to modify, distribute and sell derivative works.

 

It is a wonderful alternative for KeyCastr in Mac OS.

If you are not using a standard keyboard and Carnac fails to recognize your keyboard(e.g. Programmer's Dvorak Keyboard or the one you created), you can modify ReplaceKey.cs. If you want to change How Ctrl or Alt is presented, modify KeyProvider.cs. Here is a piece of code that I modified for Programmer's Dvorak Keyboard and Emacs style Ctrl and Meta.

//KeyProvider.cs Line 100
if (controlPressed)
    yield return "C";//"Ctrl";
if (altPressed)
    yield return "M";//"Alt";
if (isWinKeyPressed)
    yield return "Win";
// emacs style.
if ((controlPressed || altPressed) &&
      interceptKeyEventArgs.Key.Sanitise().Length==1 &&
      isLetter)
{
    //Ctrl+Shift+e to be C-S-e, and Ctrl+Shift+/ to be C-?
    //
    if (shiftPressed)
        yield return "S";//"Shift";
    yield return interceptKeyEventArgs.Key.Sanitise().ToLower();
}

//ReplaceKey.cs
private static readonly Dictionary<Keys, string> ShiftReplacements = new Dictionary<Keys, string>
{
    //Programmer's Dvorak Keyboard.
    {Keys.D0, "6"},
    {Keys.D1, "%"},
    {Keys.D2, "7"},
    {Keys.D3, "5"},
    {Keys.D4, "3"},
    {Keys.D5, "1"},
    {Keys.D6, "9"},
    {Keys.D7, "0"},
    {Keys.D8, "2"},
    {Keys.D9, "4"},
    {Keys.OemOpenBrackets, "8"},
    {Keys.Oem6, "`"},
    {Keys.OemMinus, "_"},
    {Keys.Oemplus, "^"},
    {Keys.OemBackslash, "|"},
    {Keys.Oem5, "|"},
    {Keys.OemQuestion, "?"},
    {Keys.OemPeriod, ">"},
    {Keys.Oemcomma, "<"},
    {Keys.Oem1, "\""},
    {Keys.Oem7, ":"},
    {Keys.Oemtilde, "~"},
    {Keys.Insert, "INS"},
    {Keys.Delete, "del"}
};

private static readonly Dictionary<Keys, string> Replacements = new Dictionary<Keys, string>
{
    {Keys.Space, " "},
    {Keys.D0, "]"},
    {Keys.D1, "&"},
    {Keys.D2, "["},
    {Keys.D3, "{"},
    {Keys.D4, "}"},
    {Keys.D5, "("},
    {Keys.D6, "="},
    {Keys.D7, "*"},
    {Keys.D8, ")"},
    {Keys.D9, "+"},
    {Keys.NumPad0, "0"},
    {Keys.NumPad1, "1"},
    {Keys.NumPad2, "2"},
    {Keys.NumPad3, "3"},
    {Keys.NumPad4, "4"},
    {Keys.NumPad5, "5"},
    {Keys.NumPad6, "6"},
    {Keys.NumPad7, "7"},
    {Keys.NumPad8, "8"},
    {Keys.NumPad9, "9"},
    {Keys.OemOpenBrackets, "!"},
    {Keys.Oem6, "#"},
    {Keys.OemMinus, "-"},
    {Keys.Oemplus, "@"},
    {Keys.Oem5, "\\"},
    {Keys.OemBackslash, "\\"},
    {Keys.OemQuestion, "/"},
    {Keys.OemPeriod, "."},
    {Keys.Oemcomma, ","},
    {Keys.Oem1, "'"},
    {Keys.Oem7, ";"},
    {Keys.Oemtilde, "$"},
    {Keys.Decimal, "."},
    {Keys.Divide, " / "},
    {Keys.Multiply, " * "},
    {Keys.Subtract, " - "},
    {Keys.Add, " + "},
    {Keys.LShiftKey, "S"},
    {Keys.RShiftKey, "S"},
    {Keys.LControlKey, "C"},
    {Keys.RControlKey, "C"},
    {Keys.LMenu, "M"},
    {Keys.RMenu, "M"},
    {Keys.Alt, "M"},
    {Keys.LWin, "H"},
    {Keys.RWin, "Win"},
};

登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter