console copy text was upside down.
made ctrl+space operator find and autocomplete in the console, need a bette way to make these key bindings co-exist.
This commit is contained in:
@@ -3111,7 +3111,6 @@ void ED_keymap_screen(wmWindowManager *wm)
|
||||
RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_screen_set", LEFTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "delta", -1);
|
||||
WM_keymap_add_item(keymap, "SCREEN_OT_screen_full_area", UPARROWKEY, KM_PRESS, KM_CTRL, 0);
|
||||
WM_keymap_add_item(keymap, "SCREEN_OT_screen_full_area", DOWNARROWKEY, KM_PRESS, KM_CTRL, 0);
|
||||
WM_keymap_add_item(keymap, "SCREEN_OT_screen_full_area", SPACEKEY, KM_PRESS, KM_CTRL, 0);
|
||||
WM_keymap_add_item(keymap, "SCREEN_OT_screenshot", F3KEY, KM_PRESS, KM_CTRL, 0);
|
||||
WM_keymap_add_item(keymap, "SCREEN_OT_screencast", F3KEY, KM_PRESS, KM_ALT, 0);
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
#include "UI_interface.h"
|
||||
#include "UI_resources.h"
|
||||
|
||||
//#include "console_intern.h"
|
||||
#include "console_intern.h"
|
||||
|
||||
static void console_font_begin(SpaceConsole *sc)
|
||||
{
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
struct ConsoleLine;
|
||||
struct wmOperatorType;
|
||||
struct ReportList;
|
||||
struct bContext;
|
||||
|
||||
/* console_draw.c */
|
||||
void console_text_main(struct SpaceConsole *sc, struct ARegion *ar, struct ReportList *reports);
|
||||
@@ -42,10 +43,10 @@ void *console_text_pick(struct SpaceConsole *sc, struct ARegion *ar, struct Repo
|
||||
/* console_ops.c */
|
||||
void console_history_free(SpaceConsole *sc, ConsoleLine *cl);
|
||||
void console_scrollback_free(SpaceConsole *sc, ConsoleLine *cl);
|
||||
ConsoleLine *console_history_add_str(const bContext *C, char *str, int own);
|
||||
ConsoleLine *console_scrollback_add_str(const bContext *C, char *str, int own);
|
||||
ConsoleLine *console_history_add_str(const struct bContext *C, char *str, int own);
|
||||
ConsoleLine *console_scrollback_add_str(const struct bContext *C, char *str, int own);
|
||||
|
||||
ConsoleLine *console_history_verify(const bContext *C);
|
||||
ConsoleLine *console_history_verify(const struct bContext *C);
|
||||
|
||||
int console_report_mask(SpaceConsole *sc);
|
||||
|
||||
|
||||
@@ -563,7 +563,7 @@ static int copy_exec(bContext *C, wmOperator *op)
|
||||
|
||||
ConsoleLine *cl;
|
||||
|
||||
for(cl= sc->scrollback.last; cl; cl= cl->prev) {
|
||||
for(cl= sc->scrollback.first; cl; cl= cl->next) {
|
||||
BLI_dynstr_append(buf_dyn, cl->line);
|
||||
BLI_dynstr_append(buf_dyn, "\n");
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ static void console_main_area_draw(const bContext *C, ARegion *ar)
|
||||
console_scrollback_add_str(C, "Cursor: Left/Right Home/End", 0);
|
||||
console_scrollback_add_str(C, "Remove: Backspace/Delete", 0);
|
||||
console_scrollback_add_str(C, "Execute: Enter", 0);
|
||||
console_scrollback_add_str(C, "Autocomplete: Ctrl+Enter", 0);
|
||||
console_scrollback_add_str(C, "Autocomplete: Ctrl+Space", 0);
|
||||
console_scrollback_add_str(C, "Ctrl +/- Wheel: Zoom", 0);
|
||||
console_scrollback_add_str(C, "Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.ui", 0);
|
||||
}
|
||||
@@ -281,7 +281,7 @@ void console_keymap(struct wmWindowManager *wm)
|
||||
WM_keymap_add_item(keymap, "CONSOLE_OT_exec", PADENTER, KM_PRESS, 0, 0);
|
||||
|
||||
//WM_keymap_add_item(keymap, "CONSOLE_OT_autocomplete", TABKEY, KM_PRESS, 0, 0); /* python operator - space_text.py */
|
||||
WM_keymap_add_item(keymap, "CONSOLE_OT_autocomplete", RETKEY, KM_PRESS, KM_CTRL, 0); /* python operator - space_text.py */
|
||||
WM_keymap_add_item(keymap, "CONSOLE_OT_autocomplete", SPACEKEY, KM_PRESS, KM_CTRL, 0); /* python operator - space_text.py */
|
||||
#endif
|
||||
|
||||
/* report selection */
|
||||
|
||||
@@ -521,6 +521,14 @@ static int wm_search_menu_invoke(bContext *C, wmOperator *op, wmEvent *event)
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
/* op->poll */
|
||||
int wm_search_menu_poll(bContext *C)
|
||||
{
|
||||
if(CTX_wm_window(C)==NULL) return 0;
|
||||
if(CTX_wm_area(C) && CTX_wm_area(C)->spacetype==SPACE_CONSOLE) return 0; // XXX - so we can use the shortcut in the console
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void WM_OT_search_menu(wmOperatorType *ot)
|
||||
{
|
||||
ot->name= "Search Menu";
|
||||
@@ -528,7 +536,7 @@ static void WM_OT_search_menu(wmOperatorType *ot)
|
||||
|
||||
ot->invoke= wm_search_menu_invoke;
|
||||
ot->exec= wm_search_menu_exec;
|
||||
ot->poll= WM_operator_winactive;
|
||||
ot->poll= wm_search_menu_poll;
|
||||
}
|
||||
|
||||
|
||||
@@ -1708,7 +1716,7 @@ void wm_window_keymap(wmWindowManager *wm)
|
||||
/* debug/testing */
|
||||
WM_keymap_verify_item(keymap, "WM_OT_ten_timer", TKEY, KM_PRESS, KM_ALT|KM_CTRL, 0);
|
||||
WM_keymap_verify_item(keymap, "WM_OT_debug_menu", DKEY, KM_PRESS, KM_ALT|KM_CTRL, 0);
|
||||
WM_keymap_verify_item(keymap, "WM_OT_search_menu", FKEY, KM_PRESS, KM_ALT|KM_CTRL, 0);
|
||||
WM_keymap_verify_item(keymap, "WM_OT_search_menu", SPACEKEY, KM_PRESS, KM_CTRL, 0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user