Title Case, snake_case, CAPS, and CamelCase -- Proof of Concept Build

634 views
Skip to first unread message

Ted Morin

unread,
Nov 1, 2014, 10:41:59 PM11/1/14
to plove...@googlegroups.com
Hi again,

As you've probably noticed, I've been having fun procrastinating on school work by modifying Plover. I've just whipped up a simple build to add Title Case, snake_case, CAPS, and CamelCase to Plover.

It responds to custom "MODE" commands to toggle each case, CAPS LOCK key style. Here are the strokes I defined to test:

"KA*PS": "{MODE:CAPS}",
"K-BGS": "{MODE:CAMEL}",
"TAO*EULT": "{MODE:TITLE}",
"STPHA*EUBG": "{MODE:SNAKE}",

Here's the branch on GitHub. If you want to try it on Mac or Linux, you'll have to build it yourself. Windows users can use this build off DropBox.

I'll steno a few sentences to give the gist of them:

This is a normal sentence.

This Is Me Typing In Title Mode!

Let's_try_snake_mode_for_fun..._I_guess_some_things_don't_make_sense.

AND NOW WE ARE IN ALL CAPS. SHHHHH!

Finally,CamelCase.IDon'TKnowWhatYouWereExpecting.

Title_And_Snake_Are_On...

CAPS_AND_SNAKE

So thrilling. I question the usefulness of these, but I guess CAPS and title case are useful for most people and camel and snake come in useful for programmers. Thoughts?

Mirabai Knight

unread,
Nov 1, 2014, 10:42:55 PM11/1/14
to ploversteno
This is fantastic!
> --
> You received this message because you are subscribed to the Google Groups
> "Plover" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ploversteno...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Mirabai Knight, CCP, RDR
StenoKnight CART Services
917 576 4989
m...@stenoknight.com
http://stenoknight.com

Ted Morin

unread,
Nov 1, 2014, 10:48:19 PM11/1/14
to plove...@googlegroups.com
Thanks Mirabai! Unfortunately the code is... let's just say, not proper. Proof of concept :)

Joshua Lifton

unread,
Nov 2, 2014, 2:07:41 AM11/2/14
to ploversteno
I agree, this is great and definitely along the lines of what I think
steno needs in order to reach a broader audience.

Ted Morin

unread,
Nov 2, 2014, 1:49:13 PM11/2/14
to plove...@googlegroups.com, joshua...@crowdsupply.com
A couple things were bugging me so I updated the code. I added mode commands LOWER and CLEAR. LOWER makes all output lowercase, CLEAR turns off all of lower, caps, snake, camel, and title.

So now I have:

"KA*PS": "{MODE:CAPS}",
"K-BGS": "{MODE:CAMEL}",
"TAO*EULT": "{MODE:TITLE}",
"STPHA*EUBG": "{MODE:SNAKE}",
"HRO*ER": "{MODE:LOWER}",
"KHRAO*ER": "{MODE:CLEAR}",

I also defined behavior such that enabling any case changes (caps, title mode, or lower) will disable the other ones (and camel case). Enabling snake will disable camel case. Enabling camel case disables everything else.

Again, code here, OSX and Linux must build, Windows build here.

Ted Morin

unread,
Nov 3, 2014, 10:02:23 PM11/3/14
to plove...@googlegroups.com, joshua...@crowdsupply.com
I'd like to give an update on this, as per discussions from GitHub with Josh and Hesky. Programming each case manually was messy and hard to maintain and expand. The system has been revamped to be a little more abstract. Now, these are the available commands and their function. Notably, functions no longer act as a toggle.

Case Modes:
{MODE:CAPS} - Turn on CAPS LOCK. All output will be in capitals.
{MODE:LOWER} - Turn on Lowercase. All output will be in lowercase.
{MODE:TITLE} - Turn on Title case. All output will be in "Title Case"
{MODE:CLEAR_CASE} - Disables any case modifications.
Spacing Modifications:
{MODE:SNAKE} - Replace spaces with underscores
{MODE:SET_SPACE:string} - Replaces spaces with anything after "SET_SPACE:", in this case "string". Josh suggested this could be used for a comma separated list, or a sentence separated by hyphens.
{MODE:CLEAR_SPACE} - Resets space to be a regular space.
Special Modes:
{MODE:CAMEL} - camelCase. Sets 'camel case' mode, where the first word is lowercase, then every word after is attached in title case.
{MODE:CLEAR} - Clear both space mode and case mode.

Now you can really clearly combine different cases and such. Here's what's in my dictionary with some of these commands:

"KPHA*PLD": "{MODE:CAPS}{MODE:SET_SPACE:, }", (Capital, comma-separated list)
"KA*PS": "{MODE:CAPS}",
"K-BGS": "{MODE:CAMEL}", (Short for "ca" case)
"TAO*EULT": "{MODE:TITLE}",
"STPHA*EUBG": "{MODE:SNAKE}",
"HRO*ER": "{MODE:LOWER}",
"KHRAO*ER": "{MODE:CLEAR}",

Here's another Windows build that brings us up to date. Note that this no longer includes my support for Windows key and other commands (that's another branch!)

r.p.n...@gmail.com

unread,
Dec 30, 2014, 2:42:41 PM12/30/14
to plove...@googlegroups.com, joshua...@crowdsupply.com
I think this is a great idea!
It would make programming much easier, right now I have funky emacs binds that are used to accomplish something similar, but this can be used with any other app too, so it's very useful. :)

Steve Dallas

unread,
Oct 27, 2017, 12:24:50 AM10/27/17
to Plover
Hi Ted, I just installed a recent version of Plover and would love to have your case commands. Can you give me directions to make it work? I saw the link to download the exe file. Where to put it, etc. Thanks. Steve

Glen Warner

unread,
Oct 27, 2017, 4:44:26 AM10/27/17
to Plover
On Thursday, October 26, 2017 at 9:24:50 PM UTC-7, Steve Dallas wrote:
Hi Ted, I just installed a recent version of Plover and would love to have your case commands. Can you give me directions to make it work? I saw the link to download the exe file. Where to put it, etc. Thanks. Steve

Hi, Steve.

Here's what I found while looking for information on modes:

"KA*PS": "{MODE:CAPS}",
"T-LT": "{MODE:TITLE}",
"HR*R": "{MODE:LOWER}",
"STPH-BG": "{MODE:SNAKE}",
"R-FT": "{MODE:RESET}",
"KHRAO*ER": "{MODE:RESET}",
"TK-RBS": "{MODE:SET_SPACE:-}",
"K-BGS": "{MODE:CAMEL}",
"TPH-FPS": "{MODE:SET_SPACE:}"}

And of course, I'm sure I don't have to tell you that you would stroke whatever you want to use for the mode you want, then hit your "Add Dictionary" stroke, and paste the appropriate command in there for the translation.

I use Caps, Title, Snake, and, of course, Clear.

Hope that helps a bit ...

--gdw

   

Steve Dallas

unread,
Oct 27, 2017, 8:39:08 AM10/27/17
to Plover
Got it! Thanks
Reply all
Reply to author
Forward
0 new messages