Fix T101180: console HOME key doesn't work

Regression in [0], re-order the key-map so the home key
can be used for cursor motion.

[0]: 82fc52ffc8
This commit is contained in:
Campbell Barton
2022-09-19 15:47:06 +10:00
parent 6b8b2c8e7f
commit ea35c237fc

View File

@@ -121,13 +121,14 @@ static void console_main_region_init(wmWindowManager *wm, ARegion *region)
region->v2d.cur.ymax = prev_y_min + cur_y_range;
}
keymap = WM_keymap_ensure(wm->defaultconf, "View2D Buttons List", 0, 0);
WM_event_add_keymap_handler(&region->handlers, keymap);
/* own keymap */
keymap = WM_keymap_ensure(wm->defaultconf, "Console", SPACE_CONSOLE, 0);
WM_event_add_keymap_handler_v2d_mask(&region->handlers, keymap);
/* Include after "Console" so cursor motion keys such as "Home" isn't overridden. */
keymap = WM_keymap_ensure(wm->defaultconf, "View2D Buttons List", 0, 0);
WM_event_add_keymap_handler(&region->handlers, keymap);
/* add drop boxes */
lb = WM_dropboxmap_find("Console", SPACE_CONSOLE, RGN_TYPE_WINDOW);