Sublime Forum

Survey about Modifier Keys

#1

I would very much like to get feedback from as many people as will respond to this. I will use this feedback to guide me in the design of a Package I am developing that will be producing reports about current Sublime Text Key Bindings.

Background Information

In many software applications, Function Key (and other key) bindings are often grouped by areas of functionality. Let’s take a C/C++ firmware development IDE to illustrate, using the fictional binding to the [F11] key. This IDE not only compiles and builds the firmware, but also programs and runs the microcontroller involved, in including under a debugger when needed. For illustration purposes, let’s say all of the [F11] key’s bindings surround performing compilation tasks. These key bindings use a concept of "level of severity" or "level of depth" or "level of detail", such that more modifier keys increases this level.

Here is an example where S = Shift, C = Ctrl and A = Alt key modifiers.

Table #1:

S C A Level of Severity Example Operation
- - - 0 Check syntax of current file.
x - - 1 Check syntax of whole project.
- x - 2 Compile current file.
x x - 3 Compile whole project.
- - x 4 Compile current file for debugging.
x - x 5 Compile project for debugging
- x x 6 Compile project for debugging, and program microcontroller
x x x 7 Compile project for debugging, program microcontroller, and start debugging

This follows a pattern (as you may have observed) of binary bits matching the “level of severity” with the individual bits corresponding to the modifier keys. It also (mostly) makes the [Shift] key mean “a project-wide operation” and the [Alt] key mean “for debugging”:

Bits Decimal Value
000 0
001 1
010 2
011 3
100 4
101 5
110 6
111 7

The Conflict that Brings the Need for this Survey:

I suspect that some people may instead prefer the Shift modifier key to mean the modifier key that causes the “largest severity” rather than the smallest. This would basically re-arrange the modifier key columns like this:

Table #2:

C A S Level of Severity Example Operation
- - - 0 Check syntax of current file.
x - - 1 Check syntax of whole project.
- x - 2 Compile current file.
x x - 3 Compile whole project.
- - x 4 Compile current file for debugging.
x - x 5 Compile project for debugging
- x x 6 Compile project for debugging, and program microcontroller
x x x 7 Compile project for debugging, program microcontroller, and start debugging

The Survey Question:

Which do you prefer: Table #1 or Table #2?

Kind regards,
Vic

0 Likes

#2

This might not be the response you want, but I am a Mac user, and prefer an entirely different key combo.

For me, the most used modifier keys are Command (aka. super or ⌘), Option (⌥), Control (⌃) and Shift ⇧ (in that order, with shift as a last resort).

In my own plugins I tend to use all three ⌘ + ⌥ + ⌃. It avoids collisions with other keymaps and makes for an easy keyboard combo - They are close together so it prevents finger-gymnastics.

eg:


{
        "caption": "String manipulations - Dynamic menu",
        "keys": ["ctrl+super+option+s"],
        "command": "birdyoz_menu",
        "args": {
            "menu": "string_manipulations"
        }
    },
    {
        "caption": "String manipulations - Strip lines",
        "keys": ["ctrl+super+option+l"],
        "command": "string_manipulations"
    },
    {
        "caption": "String manipulations - Bullet lines (*)",
        "keys": ["ctrl+super+option+8"],
        "command": "string_manipulations",
        "args": {
            "bol": "* "
        }
    }

1 Like

#3

Key bindings generally aren’t assigned using a “level of severity” at all. It’s a mix of:

  • Following existing standards around keybindings (eg. ctrl/cmd+c for copy)
  • Avoiding conflicts with other keybindings
  • Ease of use (simpler keybindings for more commonly used commands)

Note that these are different on every platform.

1 Like

#4

Thank you, Mr. Schaaf ( @bschaaf ) ! That certainly makes sense.

My survey was geared toward measuring the best way to present the sequence of modifier-key columns for better understanding (S, C, A vs C, A, S). Given your feedback, it would make the most sense to make the column sequence configurable. The “level of severity” concept is sometimes applied when function keys surround a single topic (e.g. the ST [F2] key is all about Bookmarks), but indeed it gets very mixed when it comes to the other key groups.

0 Likes

#5

Thank you, Greg! (@gbird)

This is actually very important for me to know! I need to factor MAC keys into my Package! Much appreciated!

Kind regards,
Vic

P.S. I see that the Mac keyboard reinforces this by their proximity and sequence (tracing clockwise on the keyboard).

0 Likes

#6

Explain why natural language can’t be used instead of memorising dictionaries of keys.
I was once flagged for recollecting “klattu barada nikto” (1951 sci-fi film). so … context … instead of relating (e.g.) F12 links to compile … just type “compile”. I do that in Ubuntu. Link memorable words to lower layer keys. Dijkstra principles. Build layers. No new package needed. The tools are there. I chose “vectors” in brand for good reasons.

0 Likes

#7

Fair question. There are 2 reasons.

  1. Say you’re going to be writing some software based on the report contents (thus accuracy is critical). Given the complexity of translating a key binding’s context conditions to English, do you trust the programmer who did it for accuracy? Sometimes you just need/want to skip someone else’s “interpretation” of the condition and go straight to the condition as it exists in the JSON file, because I need to be 100% certain. (I wrote software and firmware in a domain where lives were at stake if the firmware failed, so I may be more sensitive to this type of thing than most.)

  2. Sometimes you just need the name of the command, and what it’s arguments CAN be, so you can call the command yourself in other circumstances (e.g. a plugin, Command Palette, your own key binding, etc.). This has happened for me in many cases where the command is not documented anywhere else, but appears in the keymap.

0 Likes

#8

“I wrote software and firmware in a domain where lives were at stake if the firmware failed, so I may be more sensitive to this type of thing than most.”

You support my point. I also as an (elder) engineer with reliability engineering interests such as in health, look at where there are failures in interpretation and not all users are diehard programmers. I simply use Subl Text as one tool (although powerful) in a tool chain and having to remember the diaspora of key combinations can be an obstacle particularly in a crisis. Incidentally I was not limiting the scenario to English.

I think what I will do is create a demonstrator (although it will take some time) showing the principles of teaming Subl Text with UI automation. It is not an idle thought. I see a real need. I do not see complexity. Far from it. What would be needed is a mapping of natural language commands to key strokes. Is there a cheat sheet somewhere to work from? A Rosetta Stone if you get the metaphor. As I pointed out Dijkstra principles at work. Paras (1) and (2) merge since there can be simple commands too. A common layer.

1 Like