vI will try to keep this brief, as I will be expanding, as this is currently in development.
Version 1 Started about 2 Years Ago
Notes:
- Supports APL (Which I incidentally never used). The one advantage of that, were that unique characters could be programmed in vim for unique functions.
- Reverse Keypad on the left. Very hard to get used to.
- Caps as Backspace, Shift Caps as Delete did not work.
- Movement Keys inspired by Vim Layout. Very Successful.
Version 2 Started About 4 Months Ago
Notes:
- Reversed () to )(, and placed }{ on the shift. Works much better.
- Tried a left hand directional key strategy. WARS (WADS in QWERTY) is awful. So is FRST.
- PSCT however is amazing. You will do All direction with your index and middle finger.
- = kind of reminds me of an Enter type key, so it made sense to put it on the side.
- Moving Left Shift and Right Shift up to the home row, are amazing innovations.
- \ works well over the shift.
- The Keypad on the right was much more intuitive, but not terribly comfortable, especially its lower row
Version 3 (WIP) Starting Today
Notes:
- Background Process (See Code Below) Allows me to do BackSpace on Caps, and Backwards-Highlight-Word on Shift+Caps. (And Vice Versa)
- Mod-DH added
- Mod for spreading keyboard added. Z and ? got wrapped as a result. Swapped hands.m
- Directional Keys back on the Right hand, delegated to Level 5 to give compatibility to Google Spreadsheets (Which I use a lot). AltGr (Level 3) for whatever reason would delete cell contents.
- Getting Backspace Functionality on my Caps, and placing "_" on <BKSP> Gave me enough free space to place the ":" on Level 1, as well as "&"
- ' has been located to the mid, as it is not used very much, and is useful for both hands if typing characters into C.
- Enter has been placed on the Right Shift, to test out the bigram of Period Return.
- Moved Shift Top Row Keys onto Level 5 with the letters:
-- @ = A [At]
-- + = P [Plus]
-- ` = G [Grave]
-- ~ = T [Tilde]
-- % = M [Modulus]
-- ^ = C [Carat]
-- # = H [Hash]
-- $ = D [Dollar]
-- ¦ = B [Broken Pipe]
- Keypad has been shifted up
We will see how it goes. In addition, the following code is handled quite well, with the exception of the difficulty in adding white space to Terminals. Otherwise it is fairly simple and clean that anyone should be able to read it.
There is a tiny bug that I will fix later.
The great thing about this is that it gives me the ability to add macros. I will be attempting later to do a Join Macro like that found in vim. Will try to keep the code here updated.
(gpl v2) Author: Akiva Avraham, No warranty etc.
#include <QCoreApplication>
#include <QProcess>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
/* Monitor Key Inputs */
QProcess xinput;
xinput.start("xinput test 11"); //fixme: Magic Number. xinput list to get device id (11)
/* Set Variables */
const QString backspace("xdotool key BackSpace");
const QString deleteKey("xdotool key Delete");
const QString backHighlight("xdotool key \"ctrl+shift+Left\"");
const QString forwardHighlight("xdotool key \"ctrl+shift+Right\"");
bool capslock(false);
bool quoteKey(false);
bool clear(false);
bool combo(false);
QString s;
/* On Keystroke, perform action */
QObject::connect(&xinput, &QProcess::readyReadStandardOutput, [&](){
s = xinput.readAll();
/* Get Active Flags */
if (s.contains("key press 66")) { capslock = true; }
if (s.contains("key press 48")) { quoteKey = true; }
if (s.contains("key release 66")) { capslock = false; }
if (s.contains("key release 48")) { quoteKey = false; }
/* Logic:
* We only want a keystroke to execute on a release.
* Unless the release was done after a combo. */
if (clear ) { clear = false;
} else if (s.contains("key release 66") && quoteKey) { QProcess::execute(backHighlight); clear = true;
} else if (s.contains("key release 66") && !combo ) { QProcess::execute(backspace);
} else if (s.contains("key press 66") ) { combo = false;
} else if (s.contains("key release 48") && capslock) { QProcess::execute(forwardHighlight); clear = true;
} else if (s.contains("key release 48") && !combo ) { QProcess::execute(deleteKey);
} else if (s.contains("key press 48") ) { combo = false;
} else if (s.contains("key press ") ) { combo = true;}
});
return a.exec();
}
TLDR:
Holding Capslock will give you shift.
Tapping Capslock will give you backspace.
Holding SingleQuote (Right Shift), and tapping Capslock will give you a Backwards Word movement + Highlight, as inspired by one of Dreymars suggestions. (Need to update due to mods)
------------
After an hour of usage, I am already addicted to it.
Question is now,
Should I add functionality to my right control key, and how close to vim functionality can I get with xdotool?
Feedback and ideas encouraged.