Troubleshooters.Com®, Linux Library and Steve's ctwm Secret Stash Present:

Ctwm Menu Unexpected Behavior

Contents:

Introduction

Ctwm menus exhibit perfectly rational and consistent behavior, once you know how they work. But until you understand how they work, they'll seem bizarre.

Menu Behavior

The key piece of information everyone must have is that there are three varieties of choices in ctwm menus:

  1. A choice that runs a command
  2. A choice that brings up a submenu
  3. A choice capable of running a command orbringing up a submenu.

The problem is there's no visible distinction between cases 2 and 3, but they behave very differently. Both types 2 and 3 contain little "menu icons" to the right of the choice name (whereas type 1 does not). The following is a summary of mouseclicks and keystrokes on each of the three choice types:

Several of the preceding stimulus/action pairs are surprising to somebody accustomed to mainstream menus. Here are some tips to use ctwm menus with minimal frustration:

About Those Menu Defaults

To the extent that you author ctwm menus, I strongly suggest you incorporate no defaults. Very few real-life situations correspond well to ctwm menu defaults. About the only conforming situation I can think of is a website menu with breakdowns of categories and subcatagories, you can click on a major category to see a page about that whole category, rather than hover-descending ever finer categories. I can't see that situation happening a lot in ctwm.

If you do use defaults on some of your submenus, for gosh sakes, make those default-laden choices visually distinct. Ctwm gives you a way to manually color a menu choice. Because I don't believe defaults should be used at all, I leave it to you to find out how to manually color individual entries. Needless to say, all entries with defaults should be colored the same, and that coloration should be glanceably different from other entries.

Quick Menu Keyboarding

Ctwm menus can be pretty quick with the keyboard. Of course, to bring up a menu with the keyboard, you need a hotkey to that menu, and that subject is postponed until later documents in Steve's ctwm Secret Stash.

Earlier sections of this document thoroughly explained the results of Enter, right arrow and left arrow. For lightning quick menu access, there are a few more things to learn.

First, the Escape key acts the same as the left arrow, so if it's easier, you can use that to go up one level in the menu system, and eventually out of the whole thing.

Up arrow and Down arrow work just how you'd expect, going up or down respectively to the next higher or lower respectively choice. Both are circular, meaning that if you're on the bottom-most entry and press Down arrow again, focus goes to the topmost entry (actually the title: go figure). Same with up arrow: After it gets to the title it goes back down to the bottom most entry.

The preceding paragraph speaks of "going to" or "getting to" a menu entry. How can you tell? It's simple: The selected entry has a little left-arrow superimposed on top of it. There's also a tiny bit of 3-D-fu, but it's not glanceable: Look for the arrow.

Ctwm menus respond to letters a-z,A-Z, moving the little arrow to the next lower entry beginning with the pressed letter. If your ~/.ctwmrc includes IgnoreCaseInMenuSelection, then the letters it jumps to are case-insensitive. Otherwise, if the menu choice title begins with an uppercase, you'll need to press the Shift key along with the letter to get it to go to the next choice beginning with that letter, uppercase. I've tried it both ways, and I'm a huge fan of including IgnoreCaseInMenuSelection.

Summary

Ctwm menus exhibit quite a bit of behavior that's unexpected to those accustomed to modern menu systems. But once you know about the three types of choices and how the mouse clicks and keystrokes work, it all makes sense.


[ Training | Troubleshooters.Com | Email Steve Litt ]