This commit adds Alt-LMB as an alternative to MMB, and CTRL-ALT-LMB as an alternative...
authorTom Musgrove <LetterRip@gmail.com>
Mon, 29 Jun 2009 21:07:33 +0000 (21:07 +0000)
committerTom Musgrove <LetterRip@gmail.com>
Mon, 29 Jun 2009 21:07:33 +0000 (21:07 +0000)
source/blender/editors/interface/view2d_ops.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_text/space_text.c
source/blender/editors/space_view3d/view3d_ops.c

index bd1c734..b86150f 100644 (file)
@@ -1356,7 +1356,8 @@ void UI_view2d_keymap(wmWindowManager *wm)
        /* pan/scroll */
        WM_keymap_add_item(keymap, "VIEW2D_OT_pan", MIDDLEMOUSE, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "VIEW2D_OT_pan", MIDDLEMOUSE, KM_PRESS, KM_SHIFT, 0);
-       
+       WM_keymap_add_item(keymap, "VIEW2D_OT_pan", LEFTMOUSE, KM_PRESS, KM_ALT, 0);    
+
        WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_right", WHEELDOWNMOUSE, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_left", WHEELUPMOUSE, KM_PRESS, KM_CTRL, 0);
        
@@ -1379,6 +1380,7 @@ void UI_view2d_keymap(wmWindowManager *wm)
        
        /* zoom - drag */
        WM_keymap_add_item(keymap, "VIEW2D_OT_zoom", MIDDLEMOUSE, KM_PRESS, KM_CTRL, 0);
+       WM_keymap_add_item(keymap, "VIEW2D_OT_zoom", LEFTMOUSE, KM_PRESS, KM_ALT|KM_CTRL, 0); /* no MMB on laptops */
        
        /* borderzoom - drag */
        WM_keymap_add_item(keymap, "VIEW2D_OT_zoom_border", BKEY, KM_PRESS, KM_SHIFT, 0);
@@ -1389,9 +1391,11 @@ void UI_view2d_keymap(wmWindowManager *wm)
        /* Alternative keymap for buttons listview */
        keymap= WM_keymap_listbase(wm, "View2D Buttons List", 0, 0);
        WM_keymap_add_item(keymap, "VIEW2D_OT_pan", MIDDLEMOUSE, KM_PRESS, 0, 0);
+       WM_keymap_add_item(keymap, "VIEW2D_OT_pan", LEFTMOUSE, KM_PRESS, KM_ALT, 0); /* no MMB on laptops */
        WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_down", WHEELDOWNMOUSE, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_up", WHEELUPMOUSE, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "VIEW2D_OT_zoom", MIDDLEMOUSE, KM_PRESS, KM_CTRL, 0);
+       WM_keymap_add_item(keymap, "VIEW2D_OT_zoom", LEFTMOUSE, KM_PRESS, KM_ALT|KM_CTRL, 0); /* no MMB on laptops */
        WM_keymap_add_item(keymap, "VIEW2D_OT_zoom_out", PADMINUS, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "VIEW2D_OT_zoom_in", PADPLUSKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "VIEW2D_OT_reset", HOMEKEY, KM_PRESS, 0, 0);
index 7d6faa0..d05511b 100644 (file)
@@ -216,12 +216,14 @@ void image_keymap(struct wmWindowManager *wm)
        WM_keymap_add_item(keymap, "IMAGE_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "IMAGE_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "IMAGE_OT_view_pan", MIDDLEMOUSE, KM_PRESS, 0, 0);
+       WM_keymap_add_item(keymap, "IMAGE_OT_view_pan", LEFTMOUSE, KM_PRESS, KM_ALT, 0); /* no MMB on laptops */
 
        WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_in", WHEELINMOUSE, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_out", WHEELOUTMOUSE, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_in", PADPLUSKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_out", PADMINUS, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom", MIDDLEMOUSE, KM_PRESS, KM_CTRL, 0);
+       WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom", LEFTMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0); /* no MMB on laptops */
 
        RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD8, KM_PRESS, KM_SHIFT, 0)->ptr, "ratio", 8.0f);
        RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD4, KM_PRESS, KM_SHIFT, 0)->ptr, "ratio", 4.0f);
index 8759fd0..fb05e3e 100644 (file)
@@ -276,6 +276,8 @@ static void text_keymap(struct wmWindowManager *wm)
        WM_keymap_add_item(keymap, "TEXT_OT_overwrite_toggle", INSERTKEY, KM_PRESS, 0, 0);
 
        WM_keymap_add_item(keymap, "TEXT_OT_scroll", MIDDLEMOUSE, KM_PRESS, 0, 0);
+       WM_keymap_add_item(keymap, "TEXT_OT_scroll", LEFTMOUSE, KM_PRESS, KM_ALT, 0); /* no MMB on laptops */
+
        WM_keymap_add_item(keymap, "TEXT_OT_scroll_bar", LEFTMOUSE, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "TEXT_OT_cursor_set", LEFTMOUSE, KM_PRESS, 0, 0);
        RNA_boolean_set(WM_keymap_add_item(keymap, "TEXT_OT_cursor_set", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "select", 1);
index 6cb1051..9505e3b 100644 (file)
@@ -139,8 +139,14 @@ void view3d_keymap(wmWindowManager *wm)
        WM_keymap_verify_item(keymap, "VIEW3D_OT_cursor3d", ACTIONMOUSE, KM_PRESS, 0, 0);
        
        WM_keymap_verify_item(keymap, "VIEW3D_OT_viewrotate", MIDDLEMOUSE, KM_PRESS, 0, 0);
+       WM_keymap_add_item(keymap, "VIEW3D_OT_viewrotate", LEFTMOUSE, KM_PRESS, KM_ALT, 0); /* no MMB on laptops */
+
        WM_keymap_verify_item(keymap, "VIEW3D_OT_viewmove", MIDDLEMOUSE, KM_PRESS, KM_SHIFT, 0);
+       WM_keymap_add_item(keymap, "VIEW3D_OT_viewmove", LEFTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0); /* no MMB on laptops */
+
        WM_keymap_verify_item(keymap, "VIEW3D_OT_zoom", MIDDLEMOUSE, KM_PRESS, KM_CTRL, 0);
+       WM_keymap_add_item(keymap, "VIEW3D_OT_zoom", LEFTMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0); /* no MMB on laptops */
+
        WM_keymap_verify_item(keymap, "VIEW3D_OT_viewcenter", PADPERIOD, KM_PRESS, 0, 0);
        
        WM_keymap_verify_item(keymap, "VIEW3D_OT_smoothview", TIMER1, KM_ANY, KM_ANY, 0);