Select Block function assign to key sequence?

I would like to assign the Edit > Select > Select Block functionality to a key sequence.

First I confirmed that the functionality works when accessed using the menu item. Then in Preferences > Key Bindings, I chose the command “Code: Select Block” and assigned it the key sequence Ctrl+E B. But when I place the edit cursor within a block of code and execute the key sequence, the command is not executed. To confirm that the command is truly assigned to that key sequence, and that the problem is not Ctrl+E accidentally being assigned to some other command, I typed “Ctrl+E” in the “New Key Sequence” field, and the only command listed is the correct one (screenshot 1 below).

So I restarted Komodo in safe mode, confirmed that both the menu item and the default key sequence (Ctrl+[) work fine. In Preferences > Key Bindings, I again chose the command “Code: Select Block”, removed the default key sequence, and assigned it the key sequence Ctrl+E B. As before, the new key sequence does not work.

Any ideas what is going wrong?

@mjross, I don’t think you can use ctrl + e as a “wait for next keypress” binding. That’s what ctrl + k is for. ctrl + e will just fire immediately.

  • Carey

@careyh, is there something special about Ctrl+E that makes it unusable as a first step in a key sequence? After all, I’m already using a couple other compound Ctrl key sequences, such as:
Ctrl+G [ = Code: Jump to Matching Brace
Ctrl+M N = Macro: Start/Resume Recording
Ctrl+U L = Code: Convert Selection to Lower Case
Ctrl+I B = User Interface: Show / Hide Bottom Pane

Oh I guess I was confused because only use ctrl+k in the default schemes to wait for an additional key press.


I just tried your setup and it works just fine. With the below added to my keybindings schema I can select a block with Ctrl+e, b. Anything in your logs?

I see. It figures that I would be the person to bump into any problem like this, given that I prefer doing everything on the keyboard and, for many applications, set up all kinds of keyboard shortcuts. :slight_smile: In fact, over the decades, as I’ve gone from one editor to another, I’ve been able to still use most of the same shortcuts, which makes it easy for muscle memory.

As for Komodo, I will email my log file to you.

I’m at a bit of a loss. Maybe, could you send me your zipped up profile folder, minus the codeintel stuff?

  • Carey

Hello, Carey. I’m currently getting my brain back into “Komodo mode” and figured it would be a good idea to review my earlier forum posts. Regarding this one, I vaguely remember sending you the log file and the profile (as a zip file), but now I can’t find those messages in my Gmail Sent folder. Did I neglect to send them? If so, my apologies, and please let me know, and I will send them to you.

Oh it’s been a while. I did get it and did try it but wasn’t able to reproduce the issue. I just tried again and I’m able to set the keybinding and have it trigger with ctrl+e, b.

My only other guess would be an OS lvl key binding or some other software catching that key sequence for something else though I assume you tried other sequences.

Thanks for the update. Yes, I tried other sequences.

Here’s an idea: I see there’s a new version 12 of Komodo available, and I’m still back on 11.1. So I will upgrade now (or, after I try out those Python changes related to that other ticket), and see if it makes any difference.

@mjross fingers crossed for that idea. I was testing on 12 so perhaps that is the key.

I upgraded to version 12.0.1 of Komodo, and confirmed that the key sequence Ctrl+E B is still bound to the command “Code: Select Block”, but sadly it didn’t fix the problem.

Each time that I start the key sequence, by pressing Ctrl+E, I don’t get the usual Komodo pop-up informing me that it is “Awaiting further keys”. So something about Ctrl+E makes it unusable as the beginning of a key sequence.

The only thing I can think of now is that something in the OS is handling the keybinding before Komodo gets it. I don’t know off the top of my head how to debug that but this post looks like it might have some tips:

Thank you for the suggestion. Fortunately, I didn’t need to try any of those utilities for determining whether or not Ctrl+e is assigned to any key sequence on my operating system, because I tested that idea by trying to assign Ctrl+e in a couple applications already installed on my computer, and in all instances the key sequence Ctrl+e is not already being captured by any other process.

Here’s an example: In Microsoft Word, I went into the Tools > Customize area, to see if I could assign Ctrl+e to a Word command. In this example, I’m able to assign Ctrl+e followed by pressing w, to the command FileClose. You can see in the screenshots that I was able to type Ctrl+e and it wasn’t captured by any other application. I was able to do the same thing in Microsoft Excel. So I suspect the issue is within Komodo IDE itself.



Ok, thanks for confirming that. I’m unfortunately out of ideas here. You always seem to catch the edge cases, @mjross. You should be in QA.

LOL! Seriously, I do seem to bump into some weird ones. (But enough about my love life…)

Regarding QA, I was delighted and honored when included in the Community QA Team awhile back, which if I recall correctly was part of the development of Komodo 12.