Thursday, March 3, 2011

Put Your Mac’s Caps Lock Key to Better Use

After reading about Google’s Cr-48 ChromeOS prototype netbook, I had two immediate reactions:
1. My Mac runs Chrome + 1000s of other applications. Why would I want to reduce that to just Chrome?
2. The Cr-48 has no Caps Lock key. Instead it has a web search key. Slap your left pinky against that key and instead of SCREwiNG with what you’re writing, you get a quick web search box. Awesome. Where can I get me one of these?

Well. It took a while (mostly because I forgot about it). But I figured it out. Read on to find out how to disable your Caps Lock key, and then how to set it to activate Threshold, Quicksilver, Launchbar, or Alfred (all of which can quickly run a web search).

Setting this up is a bit convoluted, and I’ll explain why, but afterwards: it works like a charm.

Part of the convolutedness requires that you use either option-space or command-space to activate Quicksilver (or other app). Ok, you can use other combinations, but it is even more tricky to set that up, and I can explain how to do it, but I’ll do so in another post (if enough people request it).

You’ll need to install two preference panes, both from the same developer. PCKeyboard Hack and KeyRemap4MacBook (regardless of the name, this should work with any Mac). PCKeyboard Hack lets you remap your Caps Lock key to any other key. KeyRemap4MacBook lets you do all kinds of crazy remapping of your keyboard (but it CAN’T remap your Caps Lock key for some reason). In this case we want to remap your Caps Lock key to whatever keyboard combination you’ve got set to activate Quicksilver (or whatever your launcher/web searcher of choice happens to be). Now the challenge, and the reason we need both preference panes is that you can’t reasonably use a single key to activate Quicksilver. Otherwise every time you hit the command key (for example), Quicksilver would pop up. And for some reason, PCKeyboard Hack only lets you remap your Caps Lock key to a single key (not a combination like control-space). So the trick is to (use PCKeyboard Hack) to remap your Caps Lock key to another key that you almost certainly never use (because its not on your keyboard), and then (use KeyRemap4MacBook) remap that key to either option-space or command-space (to activate Quicksilver).

Ok. Convoluted explaination of a convoluted process? Check. Now onto the details:

1. First you’ll need to download and install PCKeyboard Hack and KeyRemap4Macbook.

2. Next we’ll remap your Caps Lock key. Go to System Preferences and click on PCKeyboard Hack.

In the first row you’ll see “Change Caps Lock”, double click in that row under “keycode” and enter 110. 110 is the keycode for the PC Application key.

Apparently, its this key on a Windows keyboard.

I’m guessing you don’t have a Windows keyboard (since this is a Mac only trick). Even if you do, I don’t think that key does anything in OS X. So we’ve now remapped your Caps Lock key to a key that doesn’t do anything in OS X. First, do no harm.

3. Now we’ll remap the “PC Application Key” to a keyboard combination that activates Quicksilver. Go back into System Preferences and click on the KeyRemap4Macbook icon. There’s a huge list of options that shows up. (and many interesting tricks you can use to ease your keyboard-life). You can literally get lost in this list trying out different remaps. For this post we just need one. Rather than have you scan down the list looking for it, click on the search field and type “Change PC Application Key”. This should narrow the list considerably. What you want is either the “Application Key to Option_L+Space” or “Application Key to Command_L+Space” (depending on if you want to use Command-Space or Option-Space to activate Quicksilver).

Check the appropriate box.

4. If you’ve already got the appropriate keyboard combo set up to activate Quicksilver (or Threshold, Launchbar, Alfred, etc.) then you’re good to go. Hit the Caps Lock key and enjoy. Otherwise you’ll need to go into that application’s preferences and set that up (comment below if you need info on how to do that). Some of those apps have ways of setting a specific trigger to activate ready to web search (instead of just activating). Comment below and I’ll post some info on how to do that.

UPDATE: 5. My original post forgot one last step. It turns out that OS X limits how fast it responds to the Caps Lock key. Its an attempt to cut down on accidental Caps Locking. Which is great. But for our uses, the limiting is annoying because it slows down how responsive our new web search key is. To fix this go into System Preferences»Keyboard»Keyboard tab and click on the “Modifiers…” button in the Lower right corner. 

In the dropdown menu next to the Caps Lock key, select “No Action”. Now the Caps Lock key should be as responsive as any other key. Which means our new web search key is too. Enjoy!

Tuesday, October 12, 2010

Another update to NV: better readability

Made a dent in my (still growing) to do list. I guess an apology is in order: I was so excited by the initial builds of this fork (getting NV into fullscreen, etc) that I released a little too quick. There were a couple early bugs (already squashed in the last update) and some obvious improvements to build upon and extend. I’m starting to get into those. 

I’m really grateful for the awesome response to this stuff. Lots of ideas and energy pouring in. I’ll do what I can. Please don’t hesitate to email or tweet or post a comment with ideas or complaints. But considered yourself warned: Notational Velocity itself is a beta, and this is a quickly changing fork of a beta.   Luckily (now) NV saves as you type. And the changes I’m making don’t seem to affect stability. 

So here’s what’s new in 6.3 (6 is the version of the official NV build version number):

  1. A few visual bugs and annoyances squashed. There was a weird, unnecessary, 10pixel horizontal scrolling issue that is fixed. Switching between layouts no longer produces a jarringly large notes list. Some assorted other itches like that.
  2. You can now toggle between the default black text on white background to a “Low Contrast mode” of dark text on light grey background. Easier on the eyes (especially in full screen mode).  cmd-/ or  take a look in the view menu.
  3. NV should remember what layout you use between states. The default is still the old vertical layout in windowed mode and the horizontal layout in fullscreen (it gets switched automatically when you go into and out of full screen mode). If you toggle the layout style yourself, NV will remember your choice and keep to it in windowed mode.
  4. You can now have the limited text width with margins in windowed mode (just like in full screen mode), where the text won’t get wider than 600pixels; makes for better readability. Open preferences and click the Editing button and select the third checkbox down.  You might have to adjust the window or change what note your in before this takes affect. Eventually I’ll probably add a slider letting you adjust the margins and text width. In the meantime some of these features are apple-style my way or the highway.
  5. The optional menubar icon’s drop-down menu now has a proper bookmarks menu, which is key for those who want to go dockless.
  6. A small change, is that I accidentally made the keyboard shortcut to toggle layout styles cmd-1, when cmd-#s get automatically assigned to bookmarks. I’ve changed it in this version to cmd-shift-1. You can set your own in OS X’s system prefs.

To see if you have the most update to date version open NV and go to “About Notational Velocity” in the Notational Velocity menu. You should see the following version:    ”Version 2.0 β3et (6.3)”

Download it here.   (I’ll decide whether or not to hook up a specific auto-update channel for this fork or leave it connected to the main build soon. In the meantime its a manual download, unzip, and replace to install).

Keep an eye on the main page for this fork to be sure about the proper version and stay up to date on this project.

Monday, October 11, 2010

NV fork updated and [semi] permanent page for it

Some observant commenters sent in some early bug reports, and I fixed a couple key bugs.

The main one was a bug that kept NV from autosaving your writing when the notes list was collapsed. Also possibly fixed a scrollbar bug for users with small screens. My fork is still hooked up to Scrod’s autoupdate mechanism, so to get the fixed update to my NV for download it here. Then unzip and replace the old version with the new.

To see if you have downloaded the correct version of NV, open NV and up in the Notational Velocity menu click “About Notational Velocity”.

The correct version should be: Version 2.0 β3et (6.2)

Also, I just created a Tumblr page for my fork of NV where you can check for the most recent version and any updates. Check it out, pass it along, and bookmark it.

http://elasticthreads.tumblr.com/nv


Sunday, October 10, 2010

Notational Velocity forked: Fullscreen mode, menubar app, and more…

[Quick 10/22/10 update: there’s now user customizable themes, multiple note tagging, proper support for PPC machines, and more. Read about it here.

The correct version should be: Version 2.0 β3et (6.65)   <—I’ll keep this line up to date.]


Like everyone else, I love Notational Velocity*. As part of my effort to teach myself cocoa, I thought I’d dig into Notational Velocity’s code (its open source) and see what I could learn…

I ended up adding some features I’ve always wanted to be part of NV:

- fullscreen mode

- an optional horizontal layout

- a way to quickly hide the notes list

- a menubar only (no dock-icon) option

if you’re interested you can download my fork here (it’s universal and requires at least Leopard).  

The rest of this post goes a bit deeper into some of the UX decisions I made and how the features work. Read on at your own discretion.

You can switch between default vertical layout (with the notes list above the text of the note) to a (admittedly ipad app-like) horizontal layout, with the notes’ list to the left of the text. Outside of fullscreen mode, I definitely prefer the default orientation, but creating a way to get a horizontal layout was key to fullscreen mode (where having a really wide list of your notes isn’t all that useful). So I added a UI to let you switch layouts. just hit cmd-1 (or hit up the menu item under “View”).

Fullscreen mode is pretty self explainatory. You can cmd-shift-f (or hit up the menu item under “View”) and you’ll hit it. This will also automatically switch NV’s layout to horizontal layout so that the notes list is in a column on the left instead of above the text of the note. You’ll notice I limit the text of the note to 600pixels wide so that it doesn’t get unreadably stretched out across your mac’s widescreen.

You can quickly collapse the notes’ list so that it is hidden by hitting cmd-shift-c (or hit up the menu item under “View”). This is useful in fullscreen mode… yes, I’ll admit it, it does turn NV into YAWRC (Yet Another WriteRoom Clone), but it does make for focused writing right there in NV.

The fork also lets you add a menubar icon which has a drop down menu of most NV functions (I’m still working on getting the Bookmark’s menu into the menubar dropdown). Most of the code that enables the custom view of the menubar icon and drop-down menu is from one of Matt Gemmell’s excellent open source classes(it is easy to add a menubar icon, and easy to give it a dropdown menu, and easy to get a click on the icon to activate the application, but difficult to get it to do all of this, with right-clicks and left-clicks doing different things). If NV is in the background when you left-click the icon, it will pop NV into the foreground; if NV is already in the foreground you’ll get the dropdown menu. Right-click on the icon to get the menu when NV is in the background. 

The checkbox leaves the NV icon in your dock, but enables the menubar icon. You’ll need to manually restart NV to see the icon.

The button will add the menubar icon AND hide the NV dock icon (and cmd-tab task switcher icon). Clicking this will immediately restart NV as a menubar only app. 

I didn’t have to change too much code to make all this happen, so this fork should be as stable as the standard NV (and conveniently enough NV autosaves your work, so testing out a beta fork of a beta app isn’t too risky), but if you get any crashes when using any of the features discussed here, it’s probably my fault. Please post bugs in the comments below.

I’ll be posting the source code soon for my fork soon.

[Quick update: A quirk I just noticed, not a bug but a weirdness in Apple’s fullscreen API, is that if you have set NV to hide its dock icon and be menu bar only AND you go fullscreen, you won’t be able to show the OS X menu by mousing up to the top. Which might be fine, just know that once entering fullscreen mode like this the only way out is to exit fullscreen mode using the keyboard shortcut cmd-shift-f or to quit NV using cmd-Q ]

*Notational Velocity is an excellent open source app, created by scrod. Read about NV here.

Sunday, September 12, 2010

Update for Google Voice Quicksilver actions and OS X Services

One of my first posts I released applescript actions for Quicksilver that let you easily send a SMS or initiate a phone call thru Google Voice as well as OS X (10.6 only) services that let you right click on a phone number in any application and do the same. 

Sometime in the last week the PHP script I used to work with GVoice broke. I fixed it. If you already use the QS actions and want to get them working again:

Go to “~/Library/Application Support/Quicksilver/” (“~” means your home folder) and delete “google-voice.php”. That’s it. The next time you use either the gvDialer or SMSgv actions they will automatically download the updated version.

If you already use the the OS X services you can find and delete the old “google-voice.php” file in “~/Library/Services/” folder. The next time they are run they’ll download the fixed php file.

If you’re just finding out about all of this and want in: read the original post here, the actions and services will just work.

Thursday, August 26, 2010

Chrome 7 and OS X

If you’re a Google Chrome user, or considering it, on OS X: Go download and try out the dev channel build*.  Yesterday the Chrome team updated its dev channel to Chrome 7, which includes big improvements to rendering speed and stability but also, shocker — better integration with OS X. This includes:

  • The development of a real Applescript dictionary (something Firefox doesn’t have), adding one more way to script Chrome.
  • Chrome now enables OS X Services, which in Snow Leopard are quite powerful ways of piping text and other data from one application to another or to a service.
  • Chrome also lets you send selections to  the system wide dictionary.app

* Safari has 2 basic “channels” of build, the official stable Safari releases, and the “Webkit Nightly” builds which are released every day and might be of questionable stability/reliablity. 

Chrome on the other hand has 4 concurrent channels of builds you can use.

  • The official “Stable”, or release, version of Google Chrome; the most stable, but also the most behind the features and development curve.
  • The beta channel which is very stable and has newer features than the Stable channel; this build is actually suitable for most users (remember that Google kept gmail in beta for years. Beta is sort of the new release for Google), its just not certifiably solid.
  •  Then there’s the Dev channel, which contains a lot of new features, its kind of the testing ground for UI changes and features; some stay, some change, some come and go. You can get a good idea of the future of Chrome by trying out the dev channel, and it’s actually pretty stable; I use it day to day for a lot of browsing and almost never crash it.  
  • Finally, there’s Chromium, which is the open source base for Chrome, a lot of the development of Chrome happens there, lots of changes from day to day that might eventually come downstream to the other builds, not really for day to day browsing. 
Friday, March 5, 2010

Big update to thermoCLine posted

the universal text field for OS X is now smarter, more accessible, and easier to use.

there’s also global keyboard shortcuts, and much more…

download it, or watch the demo video  here.

Sunday, November 1, 2009

Threshold has its own tumblr

thermoCLineThreshold has been taking over a lot of things lately. It no longer will be dominating this tumblr… it has its own: thermoCLui9

Friday, October 30, 2009

a new UI for thermoCLine is coming…

thermoCLui5

thermoCLine has been re-branded: it’s now Threshold

Download thermoCLine Threshold… here.

thermoCLui4