added win32 style ctrl keystrokes for cut/copy/paste/undo/redo
authorRob Haarsma <phaseIV@zonnet.nl>
Wed, 29 Jan 2003 13:49:25 +0000 (13:49 +0000)
committerRob Haarsma <phaseIV@zonnet.nl>
Wed, 29 Jan 2003 13:49:25 +0000 (13:49 +0000)
source/blender/src/drawtext.c
source/blender/src/toets.c

index f560addf455f9bef05b4c8b00a3187013badaecb..b738e251a46dd757c6738268715ae46e30541318 100644 (file)
@@ -975,7 +975,7 @@ void winqreadtextspace(unsigned short event, short val, char ascii)
                        break;
 
                case CKEY:
-                       if (G.qual & LR_ALTKEY) {
+                       if (G.qual & LR_ALTKEY || G.qual & LR_CTRLKEY) {
                                txt_copy_sel(text);
                                do_draw= 1;     
                        }
@@ -1069,7 +1069,7 @@ void winqreadtextspace(unsigned short event, short val, char ascii)
                        break;
 
                case VKEY:
-                       if (G.qual & LR_ALTKEY) {
+                       if (G.qual & LR_ALTKEY || G.qual & LR_CTRLKEY) {
                                txt_paste(text);
                                do_draw= 1;     
                                pop_space_text(st);
@@ -1077,13 +1077,25 @@ void winqreadtextspace(unsigned short event, short val, char ascii)
                        break;
 
                case XKEY:
-                       if (G.qual & LR_ALTKEY) {
+                       if (G.qual & LR_ALTKEY || G.qual & LR_CTRLKEY) {
                                txt_cut_sel(text);
                                do_draw= 1;     
                                pop_space_text(st);
                        }
                        break;
                
+               case ZKEY:
+                       if (G.qual & LR_ALTKEY || G.qual & LR_CTRLKEY) {
+                               if (G.qual & LR_SHIFTKEY) {
+                                       txt_do_redo(text);
+                                       do_draw= 1;
+                               } else {
+                                       txt_do_undo(text);
+                                       do_draw= 1;
+                               }
+                       }
+                       break;
+
                case TABKEY:
                        txt_add_char(text, '\t');
                        pop_space_text(st);
index 7a814b24cf9093f8d24e886f2b4a327958487f08..7a683ed9bfc6da5257e11705853844723e2fe1ef 100644 (file)
@@ -829,7 +829,6 @@ int blenderqread(unsigned short event, short val)
                break;
                                
        case UKEY:
-       
                if(textediting==0) {
                        if(G.qual & LR_CTRLKEY) {
                                if(okee("SAVE USER DEFAULTS")) {
@@ -862,13 +861,14 @@ int blenderqread(unsigned short event, short val)
                break;
                
        case XKEY:
-               if(G.qual & LR_CTRLKEY) {
-                       if(okee("ERASE ALL")) {
-                               if( BIF_read_homefile()==0) error("No file ~/.B.blend");
+               if(textspace==0) {
+                       if(G.qual & LR_CTRLKEY) {
+                               if(okee("ERASE ALL")) {
+                                       if( BIF_read_homefile()==0) error("No file ~/.B.blend");
+                               }
+                               return 0;
                        }
-                       return 0;
                }
-               
                break;
        }