Page MenuHome

Show mouse button keymap in the status bar
AbandonedPublic

Authored by Campbell Barton (campbellbarton) on Jun 26 2018, 9:36 AM.

Details

Summary

This patch makes the status bar show the keymap for events that would run when pressing left/middle/right mouse buttons, responding to context changes.

Currently we don't have icons for LMB/MMB/RMB & dragging - needed before committing.

Supports:

  • Keymaps for the space type and tool.
  • Updates on changes to modifier keys, pointer location.
  • While this runs after handling notifiers, it does it's best to avoid expensive updates.

Limitations:

  • Does not respond to modal keymaps (we might do this in the future so we don't have knife, fly mode etc... using a different kind of display).
  • Does not yet support manipulator keymaps (not sure how useful this is, there is probably nothing stopping us from supporting them).

Diff Detail

Repository
rB Blender
Branch
TEMP-STATUS-KEYS
Build Status
Buildable 1783
Build 1783: arc lint + arc unit

Event Timeline

Campbell Barton (campbellbarton) retitled this revision from Show mouse button map in the status bar T54861 to Show mouse button keymap in the status bar.Jun 26 2018, 9:38 AM
Campbell Barton (campbellbarton) edited the summary of this revision. (Show Details)
Brecht Van Lommel (brecht) requested changes to this revision.Jun 26 2018, 4:36 PM
Brecht Van Lommel (brecht) added inline comments.
release/scripts/startup/bl_ui/space_statusbar.py
42–49

Just remove the code I think.

source/blender/windowmanager/intern/wm_event_system.c
4233

Perhaps this code could be in wm_keymap.c?

4320–4332

Technically it seems more correct to free cursor_keymap_status in the fullscreen and hidden status bar cases, though the probability of this actually causing a missing refresh due to the event state being identical is small.

4350–4365

This should use screen->active_region, so that modal tools and operators do not switch the status info when going outside the area. You can find sa from the region then.

This revision now requires changes to proceed.Jun 26 2018, 4:36 PM
Campbell Barton (campbellbarton) marked 2 inline comments as done.
source/blender/windowmanager/intern/wm_event_system.c
4233

Looked into doing this but it relies on enough static functions here that it didn't end up seeming worth it.