Skip to content

Commit

Permalink
Add accelerator key for Cutout tool (#1855)
Browse files Browse the repository at this point in the history
  • Loading branch information
FirasH authored Nov 18, 2020
1 parent 9343c01 commit 3c71750
Showing 1 changed file with 77 additions and 76 deletions.
153 changes: 77 additions & 76 deletions synfig-studio/src/gui/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1311,85 +1311,86 @@ DEFINE_ACTION("keyframe-properties", _("Properties"));
Gtk::AccelMap::add_entry(accel_key.get_path(), accel_key.get_key(), accel_key.get_mod()); \
}

// the toolbox
ACCEL("s", "<Actions>/action_group_state_manager/state-normal" );
ACCEL("m", "<Actions>/action_group_state_manager/state-smooth_move" );
ACCEL("l", "<Actions>/action_group_state_manager/state-scale" );
ACCEL("a", "<Actions>/action_group_state_manager/state-rotate" );
ACCEL("i", "<Actions>/action_group_state_manager/state-mirror" );
ACCEL("e", "<Actions>/action_group_state_manager/state-circle" );
ACCEL("r", "<Actions>/action_group_state_manager/state-rectangle" );
ACCEL("asterisk", "<Actions>/action_group_state_manager/state-star" );
ACCEL("g", "<Actions>/action_group_state_manager/state-gradient" );
ACCEL("o", "<Actions>/action_group_state_manager/state-polygon" );
ACCEL("b", "<Actions>/action_group_state_manager/state-bline" );
ACCEL("n", "<Actions>/action_group_state_manager/state-bone" );
ACCEL("t", "<Actions>/action_group_state_manager/state-text" );
ACCEL("u", "<Actions>/action_group_state_manager/state-fill" );
ACCEL("d", "<Actions>/action_group_state_manager/state-eyedrop" );
ACCEL("z", "<Actions>/action_group_state_manager/state-zoom" );
ACCEL("p", "<Actions>/action_group_state_manager/state-draw" );
ACCEL("k", "<Actions>/action_group_state_manager/state-sketch" );
ACCEL("w", "<Actions>/action_group_state_manager/state-width" );

// everything else
ACCEL("<Control>a", "<Actions>/canvasview/select-all-ducks" );
ACCEL("<Control>d", "<Actions>/canvasview/unselect-all-ducks" );
ACCEL("<Control><Shift>a", "<Actions>/canvasview/select-all-layers" );
ACCEL("<Control><Shift>d", "<Actions>/canvasview/unselect-all-layers" );
ACCEL("F9", "<Actions>/canvasview/render" );
ACCEL("F11", "<Actions>/canvasview/preview" );
ACCEL("F8", "<Actions>/canvasview/properties" );
ACCEL("F12", "<Actions>/canvasview/options" );
ACCEL("<control>i", "<Actions>/canvasview/import" );
//ACCEL2(Gtk::AccelKey(GDK_KEY_Escape,static_cast<Gdk::ModifierType>(0), "<Actions>/canvasview/stop" ));
// ACCEL2(Gtk::AccelKey(GDK_KEY_Escape, Gdk::ModifierType(), "<Actions>/canvasview/stop" ));
ACCEL("<Control>g", "<Actions>/canvasview/toggle-grid-show" );
ACCEL("<Control>l", "<Actions>/canvasview/toggle-grid-snap" );
ACCEL("<Control>n", "<Actions>/mainwindow/new" );
ACCEL("<Control>o", "<Actions>/mainwindow/open" );
ACCEL("<Control>s", "<Actions>/canvasview/save" );
ACCEL("<Control><Shift>s", "<Actions>/canvasview/save-as" );
ACCEL2(Gtk::AccelKey('`',Gdk::CONTROL_MASK, "<Actions>/canvasview/toggle-low-res" ));
ACCEL("<Mod1>0", "<Actions>/canvasview/mask-none-ducks" );
ACCEL("<Mod1>1", "<Actions>/canvasview/mask-position-ducks" );
ACCEL("<Mod1>2", "<Actions>/canvasview/mask-vertex-ducks" );
ACCEL("<Mod1>3", "<Actions>/canvasview/mask-tangent-ducks" );
ACCEL("<Mod1>4", "<Actions>/canvasview/mask-radius-ducks" );
ACCEL("<Mod1>5", "<Actions>/canvasview/mask-width-ducks" );
ACCEL("<Mod1>6", "<Actions>/canvasview/mask-angle-ducks" );
ACCEL("<Mod1>7", "<Actions>/canvasview/mask-bone-setup-ducks" );
ACCEL("<Mod1>8", "<Actions>/canvasview/mask-bone-recursive-ducks" );
ACCEL("<Mod1>9", "<Actions>/canvasview/mask-bone-ducks" );
ACCEL("<Mod1>5", "<Actions>/canvasview/mask-widthpoint-position-ducks" );
ACCEL2(Gtk::AccelKey(GDK_KEY_Page_Up,Gdk::SHIFT_MASK, "<Actions>/action_group_layer_action_manager/action-LayerRaise" ));
ACCEL2(Gtk::AccelKey(GDK_KEY_Page_Down,Gdk::SHIFT_MASK, "<Actions>/action_group_layer_action_manager/action-LayerLower" ));
ACCEL("<Control>1", "<Actions>/canvasview/quality-01" );
ACCEL("<Control>2", "<Actions>/canvasview/quality-02" );
ACCEL("<Control>3", "<Actions>/canvasview/quality-03" );
ACCEL("<Control>4", "<Actions>/canvasview/quality-04" );
ACCEL("<Control>5", "<Actions>/canvasview/quality-05" );
ACCEL("<Control>6", "<Actions>/canvasview/quality-06" );
ACCEL("<Control>7", "<Actions>/canvasview/quality-07" );
ACCEL("<Control>8", "<Actions>/canvasview/quality-08" );
ACCEL("<Control>9", "<Actions>/canvasview/quality-09" );
ACCEL("<Control>0", "<Actions>/canvasview/quality-10" );
ACCEL("<Primary>z", "<Actions>/action_group_dock_history/undo");
// Toolbox
ACCEL("s", "<Actions>/action_group_state_manager/state-normal");
ACCEL("m", "<Actions>/action_group_state_manager/state-smooth_move");
ACCEL("l", "<Actions>/action_group_state_manager/state-scale");
ACCEL("a", "<Actions>/action_group_state_manager/state-rotate");
ACCEL("i", "<Actions>/action_group_state_manager/state-mirror");
ACCEL("e", "<Actions>/action_group_state_manager/state-circle");
ACCEL("r", "<Actions>/action_group_state_manager/state-rectangle");
ACCEL("asterisk", "<Actions>/action_group_state_manager/state-star");
ACCEL("g", "<Actions>/action_group_state_manager/state-gradient");
ACCEL("o", "<Actions>/action_group_state_manager/state-polygon");
ACCEL("b", "<Actions>/action_group_state_manager/state-bline");
ACCEL("n", "<Actions>/action_group_state_manager/state-bone");
ACCEL("t", "<Actions>/action_group_state_manager/state-text");
ACCEL("u", "<Actions>/action_group_state_manager/state-fill");
ACCEL("d", "<Actions>/action_group_state_manager/state-eyedrop");
ACCEL("c", "<Actions>/action_group_state_manager/state-lasso");
ACCEL("z", "<Actions>/action_group_state_manager/state-zoom");
ACCEL("p", "<Actions>/action_group_state_manager/state-draw");
ACCEL("k", "<Actions>/action_group_state_manager/state-sketch");
ACCEL("w", "<Actions>/action_group_state_manager/state-width");

// Everything else
ACCEL("<Control>a", "<Actions>/canvasview/select-all-ducks");
ACCEL("<Control>d", "<Actions>/canvasview/unselect-all-ducks");
ACCEL("<Control><Shift>a", "<Actions>/canvasview/select-all-layers");
ACCEL("<Control><Shift>d", "<Actions>/canvasview/unselect-all-layers");
ACCEL("F9", "<Actions>/canvasview/render");
ACCEL("F11", "<Actions>/canvasview/preview");
ACCEL("F8", "<Actions>/canvasview/properties");
ACCEL("F12", "<Actions>/canvasview/options");
ACCEL("<control>i", "<Actions>/canvasview/import");
//ACCEL2(Gtk::AccelKey(GDK_KEY_Escape,static_cast<Gdk::ModifierType>(0), "<Actions>/canvasview/stop"));
//ACCEL2(Gtk::AccelKey(GDK_KEY_Escape, Gdk::ModifierType(), "<Actions>/canvasview/stop"));
ACCEL("<Control>g", "<Actions>/canvasview/toggle-grid-show");
ACCEL("<Control>l", "<Actions>/canvasview/toggle-grid-snap");
ACCEL("<Control>n", "<Actions>/mainwindow/new");
ACCEL("<Control>o", "<Actions>/mainwindow/open");
ACCEL("<Control>s", "<Actions>/canvasview/save");
ACCEL("<Control><Shift>s", "<Actions>/canvasview/save-as");
ACCEL2(Gtk::AccelKey('`',Gdk::CONTROL_MASK, "<Actions>/canvasview/toggle-low-res"));
ACCEL("<Mod1>0", "<Actions>/canvasview/mask-none-ducks");
ACCEL("<Mod1>1", "<Actions>/canvasview/mask-position-ducks");
ACCEL("<Mod1>2", "<Actions>/canvasview/mask-vertex-ducks");
ACCEL("<Mod1>3", "<Actions>/canvasview/mask-tangent-ducks");
ACCEL("<Mod1>4", "<Actions>/canvasview/mask-radius-ducks");
ACCEL("<Mod1>5", "<Actions>/canvasview/mask-width-ducks");
ACCEL("<Mod1>6", "<Actions>/canvasview/mask-angle-ducks");
ACCEL("<Mod1>7", "<Actions>/canvasview/mask-bone-setup-ducks");
ACCEL("<Mod1>8", "<Actions>/canvasview/mask-bone-recursive-ducks");
ACCEL("<Mod1>9", "<Actions>/canvasview/mask-bone-ducks");
ACCEL("<Mod1>5", "<Actions>/canvasview/mask-widthpoint-position-ducks");
ACCEL2(Gtk::AccelKey(GDK_KEY_Page_Up,Gdk::SHIFT_MASK, "<Actions>/action_group_layer_action_manager/action-LayerRaise"));
ACCEL2(Gtk::AccelKey(GDK_KEY_Page_Down,Gdk::SHIFT_MASK, "<Actions>/action_group_layer_action_manager/action-LayerLower"));
ACCEL("<Control>1", "<Actions>/canvasview/quality-01");
ACCEL("<Control>2", "<Actions>/canvasview/quality-02");
ACCEL("<Control>3", "<Actions>/canvasview/quality-03");
ACCEL("<Control>4", "<Actions>/canvasview/quality-04");
ACCEL("<Control>5", "<Actions>/canvasview/quality-05");
ACCEL("<Control>6", "<Actions>/canvasview/quality-06");
ACCEL("<Control>7", "<Actions>/canvasview/quality-07");
ACCEL("<Control>8", "<Actions>/canvasview/quality-08");
ACCEL("<Control>9", "<Actions>/canvasview/quality-09");
ACCEL("<Control>0", "<Actions>/canvasview/quality-10");
ACCEL("<Primary>z", "<Actions>/action_group_dock_history/undo");
#if _WIN32
ACCEL("<Control>y", "<Actions>/action_group_dock_history/redo");
ACCEL("<Control>y", "<Actions>/action_group_dock_history/redo");
#else
ACCEL("<Primary><Shift>z", "<Actions>/action_group_dock_history/redo");
ACCEL("<Primary><Shift>z", "<Actions>/action_group_dock_history/redo");
#endif
ACCEL2(Gtk::AccelKey(GDK_KEY_Delete,Gdk::ModifierType(), "<Actions>/action_group_layer_action_manager/action-LayerRemove" ));
ACCEL2(Gtk::AccelKey('(',Gdk::CONTROL_MASK, "<Actions>/canvasview/decrease-low-res-pixel-size" ));
ACCEL2(Gtk::AccelKey(')',Gdk::CONTROL_MASK, "<Actions>/canvasview/increase-low-res-pixel-size" ));
ACCEL2(Gtk::AccelKey('(',Gdk::MOD1_MASK|Gdk::CONTROL_MASK, "<Actions>/action_group_layer_action_manager/amount-dec" ));
ACCEL2(Gtk::AccelKey(')',Gdk::MOD1_MASK|Gdk::CONTROL_MASK, "<Actions>/action_group_layer_action_manager/amount-inc" ));
ACCEL("equal", "<Actions>/canvasview/canvas-zoom-in" );
ACCEL("minus", "<Actions>/canvasview/canvas-zoom-out" );
ACCEL("0", "<Actions>/canvasview/canvas-zoom-fit" );
ACCEL2(Gtk::AccelKey('+',Gdk::CONTROL_MASK, "<Actions>/canvasview/time-zoom-in" ));
ACCEL2(Gtk::AccelKey('_',Gdk::CONTROL_MASK, "<Actions>/canvasview/time-zoom-out" ));
ACCEL2(Gtk::AccelKey(GDK_KEY_Delete,Gdk::ModifierType(), "<Actions>/action_group_layer_action_manager/action-LayerRemove"));
ACCEL2(Gtk::AccelKey('(',Gdk::CONTROL_MASK, "<Actions>/canvasview/decrease-low-res-pixel-size"));
ACCEL2(Gtk::AccelKey(')',Gdk::CONTROL_MASK, "<Actions>/canvasview/increase-low-res-pixel-size"));
ACCEL2(Gtk::AccelKey('(',Gdk::MOD1_MASK|Gdk::CONTROL_MASK, "<Actions>/action_group_layer_action_manager/amount-dec"));
ACCEL2(Gtk::AccelKey(')',Gdk::MOD1_MASK|Gdk::CONTROL_MASK, "<Actions>/action_group_layer_action_manager/amount-inc"));
ACCEL("equal", "<Actions>/canvasview/canvas-zoom-in");
ACCEL("minus", "<Actions>/canvasview/canvas-zoom-out");
ACCEL("0", "<Actions>/canvasview/canvas-zoom-fit");
ACCEL2(Gtk::AccelKey('+',Gdk::CONTROL_MASK, "<Actions>/canvasview/time-zoom-in"));
ACCEL2(Gtk::AccelKey('_',Gdk::CONTROL_MASK, "<Actions>/canvasview/time-zoom-out"));
ACCEL("bracketleft", "<Actions>/canvasview/jump-prev-keyframe");
ACCEL("bracketright", "<Actions>/canvasview/jump-next-keyframe");
ACCEL("comma", "<Actions>/canvasview/seek-prev-frame");
Expand Down

0 comments on commit 3c71750

Please sign in to comment.