From 0404a36cf412ce49a2885e622fa2d04d8e1c4c99 Mon Sep 17 00:00:00 2001 From: Serhii Sakhno Date: Sun, 9 Aug 2015 18:23:01 +0000 Subject: [PATCH] Eolite 3.01 beta: use scan codes (Part 1) git-svn-id: svn://kolibrios.org@5697 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/eolite/Eolite.c | 97 +++++++++++++++++++++--------------- programs/cmm/lib/kolibri.h | 6 +++ 2 files changed, 62 insertions(+), 41 deletions(-) diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index 2f4b5132da..d0d9ddacd2 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -103,8 +103,8 @@ enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir enum { CREATE_FILE=1, CREATE_FOLDER, RENAME_ITEM }; //NewElement -#define TITLE "Eolite File Manager v3.0 beta" -#define ABOUT_TITLE "Eolite 3.0 beta" +#define TITLE "Eolite File Manager v3.01 beta" +#define ABOUT_TITLE "Eolite 3.01 beta" dword col_padding, col_selec, col_lpanel; int toolbar_buttons_x[7]={9,46,85,134,167,203}; @@ -177,7 +177,8 @@ byte cmd_free=0; void main() { - word key, id; + word key,key2, id; + dword status_key; char can_show, can_select, stats; dword selected_offset; dword IPC_LEN,IPC_ID; @@ -407,7 +408,12 @@ void main() break; //Key pressed----------------------------------------------------------------------------- case evKey: - key = GetKey(); + GetFullKey(); + key = AH; + $shr eax,16 + key2 = AL; + status_key = GetStatusKey(); + if (Form.status_window>2) break; if (del_active) { @@ -434,6 +440,52 @@ void main() List_ReDraw(); break; } + + if (TestBit(status_key, 2)) + { + switch(key2) + { + case 45: //Ctrl+X + Copy(#file_path, CUT); + break; + case 46: //Ctrl+C + Copy(#file_path, NOCUT); + break; + case 47: //Ctrl+V + Paste(); + break; + case 032: //Ctrl+D - set as bg + strncpy(#temp, "\\S__",4); + strcat(#temp, #file_path); + RunProgram("/sys/media/kiv", #temp); + break; + case 049: //Ctrl+N - create new window + if (Form.left==98) MoveSize(Form.left-20,Form.top-20,OLD,OLD); + RunProgram("/sys/File Managers/Eolite", #path); + break; + case 030: //Ctrl+A - select all files + for (i=0; i