hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=5b7bdd95ba3956a84eeb9350a15ccc38484b267e

commit 5b7bdd95ba3956a84eeb9350a15ccc38484b267e
Author: ChunEon Park <her...@hermet.pe.kr>
Date:   Thu Jun 11 17:19:52 2015 +0900

    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.
---
 README           | 10 ++++----
 data/about/ABOUT | 10 ++++----
 src/bin/main.c   | 72 +++++++++++++++++++++++++++++++++++---------------------
 3 files changed, 57 insertions(+), 35 deletions(-)

diff --git a/README b/README
index 4b39445..ccef5fc 100644
--- a/README
+++ b/README
@@ -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
diff --git a/data/about/ABOUT b/data/about/ABOUT
index ed2592f..97e6d7a 100644
--- a/data/about/ABOUT
+++ b/data/about/ABOUT
@@ -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
diff --git a/src/bin/main.c b/src/bin/main.c
index 1e61f23..1a384ed 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -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;
 }
 
@@ -578,6 +582,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)
 {
    //Save
@@ -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"))
      {

-- 


Reply via email to