change the short-cut key usage.

previous panes toggle is triggered by ctrl + arrow keys.
But editor itself uses ctrl key for cursor move/jump.
To conserve the cursor key, we change the panes short-cut.

Thanks jpeg to report this.
This commit is contained in:
ChunEon Park 2015-06-11 17:19:52 +09:00
parent 08c9ddeecd
commit 5b7bdd95ba
3 changed files with 57 additions and 35 deletions

10
README
View File

@ -44,13 +44,15 @@ Ctrl+I = On/Off Auto Indentation
Ctrl+O = On/Off Auto Completion
Ctrl+W = Show/Hide Dummy Swallow
Ctrl+H = On/Off Part Highlighting
Ctrl+Left = On/Off Full Edit View
Ctrl+Up = On/Off Full Console View
Ctrl+Down = On/Off Full Editors View
Ctrl+T = Insert Defaut Template Code
Ctrl+Mouse Wheel Up = View Scale Up / Font Size Up
Ctrl+Mouse Wheel Down = View Scale Down / Font Size Down
Alt+Left = On/Off Full Edit View
Alt+Right = On/Off Full Live View
Alt+Up = On/Off Full Console View
Alt+Down = On/Off Full Editors View
Ctrl+A = Select Text All
Ctrl+Double Click = Select a word
Ctrl+Z = Undo Text

View File

@ -26,13 +26,15 @@ Ctrl+I = On/Off Auto Indentation
Ctrl+O = On/Off Auto Completion
Ctrl+W = Show/Hide Dummy Swallow
Ctrl+H = On/Off Part Highlighting
Ctrl+Left = On/Off Full Edit View
Ctrl+Up = On/Off Full Console View
Ctrl+Down = On/Off Full Editors View
Ctrl+T = Insert Defaut Template Code
Ctrl+Mouse Wheel Up = View Scale Up / Font Size Up
Ctrl+Mouse Wheel Down = View Scale Down / Font Size Down
Alt+Left = On/Off Full Edit View
Alt+Right = On/Off Full Live View
Alt+Up = On/Off Full Console View
Alt+Down = On/Off Full Editors View
Ctrl+A = Select Text All
Ctrl+Double Click = Select a word
Ctrl+Z = Undo Text

View File

@ -11,6 +11,7 @@ typedef struct app_s
Evas_Object *enventor;
Eina_Bool ctrl_pressed : 1;
Eina_Bool alt_pressed : 1;
Eina_Bool template_new : 1;
} app_data;
@ -25,6 +26,9 @@ main_key_up_cb(void *data, int type EINA_UNUSED, void *ev)
if (!strcmp("Control_L", event->key))
ad->ctrl_pressed = EINA_FALSE;
if (!strcmp("Alt_L", event->key))
ad->alt_pressed = EINA_FALSE;
return ECORE_CALLBACK_PASS_ON;
}
@ -577,6 +581,35 @@ default_template_insert(app_data *ad)
}
}
static Eina_Bool
alt_func(app_data *ad, const char *key)
{
//Full Edit View
if (!strcmp(key, "Left"))
{
base_live_view_full_view();
return ECORE_CALLBACK_DONE;
}
//Full Live View
if (!strcmp(key, "Right"))
{
base_enventor_full_view();
return ECORE_CALLBACK_DONE;
}
//Full Console View
if (!strcmp(key, "Up"))
{
base_console_full_view();
return ECORE_CALLBACK_DONE;
}
//Full Editors View
if (!strcmp(key, "Down"))
{
base_editors_full_view();
return ECORE_CALLBACK_DONE;
}
}
static Eina_Bool
ctrl_func(app_data *ad, const char *key)
{
@ -624,30 +657,6 @@ ctrl_func(app_data *ad, const char *key)
default_template_insert(ad);
return ECORE_CALLBACK_DONE;
}
//Full Edit View
if (!strcmp(key, "Left"))
{
base_live_view_full_view();
return ECORE_CALLBACK_DONE;
}
//Full Live View
if (!strcmp(key, "Right"))
{
base_enventor_full_view();
return ECORE_CALLBACK_DONE;
}
//Full Console View
if (!strcmp(key, "Up"))
{
base_console_full_view();
return ECORE_CALLBACK_DONE;
}
//Full Editors View
if (!strcmp(key, "Down"))
{
base_editors_full_view();
return ECORE_CALLBACK_DONE;
}
//Auto Indentation
if (!strcmp(key, "i") || !strcmp(key, "I"))
{
@ -716,9 +725,10 @@ main_key_down_cb(void *data, int type EINA_UNUSED, void *ev)
if (file_mgr_warning_is_opened()) return ECORE_CALLBACK_PASS_ON;
if (ad->ctrl_pressed)
{
return ctrl_func(ad, event->key);
}
return ctrl_func(ad, event->key);
if (ad->alt_pressed)
return alt_func(ad, event->key);
//Control Key
if (!strcmp("Control_L", event->key))
@ -728,6 +738,14 @@ main_key_down_cb(void *data, int type EINA_UNUSED, void *ev)
return ECORE_CALLBACK_PASS_ON;
}
//Alt Key
if (!strcmp("Alt_L", event->key))
{
enventor_object_ctxpopup_dismiss(ad->enventor);
ad->alt_pressed = EINA_TRUE;
return ECORE_CALLBACK_PASS_ON;
}
//README
if (!strcmp(event->key, "F1"))
{