Cannot define Alt-E keybinding in Text Editor window #32437
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#32437
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
%%%This addon https://github.com/ldo/edit_external_for_blender adds a new command to the “Text” menu in the Text Editor window. It also tries to define a keyboard shortcut for that menu item. The menu item displays in the menu, together with its keyboard shortcut, just fine. The menu item also works fine when selected with the mouse. However, the keyboard shortcut only works when there is NO text block currently open; otherwise, it ends up inserting the letter “e” into the text block.
Am I doing something wrong? If I was, I wouldn't expect the shortcut to show up or work at all.
Tested with a recent Blender 2.63.17 build.%%%
Changed status to: 'Open'
%%%Confirmed.
After having a bit of a poke around, I think what's happening is that since keymaps are evaluated in sequential order (first match wins) and your hotkey is getting added on to the builtin one for the Text Editor, the "KM_TEXTINPUT, KM_ALL, KM_ALL" keymaps at the end (i.e. a catch-all for anything that looks remotely like text but hasn't been caught as a command) fires. Hence, the event never gets to your operator.
I've added a fix to svn. You'll need to modify your script (specifically the keymap.new() call) to include "head=True", which makes your keymap item get added at the start of the keymap to avoid the problems at the end.%%%
Changed status from 'Open' to: 'Resolved'
%%%Thank you for that. I have done the change and confirmed that it works.
As an aside, I can't help thinking that a lot of these detailed comments that you put in commit messages belong in the source code, not (just) in the commit log. Because a future maintainer might wonder why things are done a certain way, and will almost certainly not think of looking in the commit history for items affecting those source lines for more info.%%%