Notices


Reply
Thread Tools
Posts: 562 | Thanked: 1,732 times | Joined on Jan 2010 @ NYC
#1
Thanks Aapo, for the new MyPaint version.

I wanted to contribute something to one of my favorite apps. And thought people might find it useful to have a quick reference guide for mypaint, since we have lots of keyboard shortcut that are customizable.

Since the current new version no longer supports accelmap.conf file replacement this whole idea may be moot. So please let me know if you guys think we need this.

So here's what I have:


This guide is based on the old 0.8.2 shortcut accelmap.conf file. Though I couldn't figure out how to change some of the keys (like the spacebar/pan - if anyone knows please help)

Since the new shortcuts follow the desktop layout most people will most likely customize them anyway. I can make another version with new agreed upon keyboard shortcut. I'm open for some feed back.

Here are my suggestions. Which I think make for a good start, except for a few missing ones and a few page-up/down, tab keys.

UPDATE - 7/20/11

Now that this has been correct (for me at least..lol) I will post a generic accelmap.conf soon.

------ changes no longer needed -------------------------------

I will keep these Keyboard command for anyone who might need to change the built in ones. Just always have a backup just in case. And these will most likely will be overwritten when you install an update.

--- These are the seting for the keyboard commands (mypaint 0.9.2-1maemo7)
--- /home/opt/mypaint/share/mypaint/gui/document.py
Code:
# name, stock id, label, accelerator, tooltip, callback
        actions = [
            ('Undo',               gtk.STOCK_UNDO, _('Undo'), 'Z', None, self.undo_cb),
            ('Redo',               gtk.STOCK_REDO, _('Redo'), 'Y', None, self.redo_cb),

            ('Brighter',     None, _('Brighter'), '<Shift>a', None, self.brighter_cb),
            ('Smaller',      None, _('Smaller'), 'd', None, self.brush_smaller_cb),
            ('MoreOpaque',   None, _('More Opaque'), 's', None, self.more_opaque_cb),
            ('LessOpaque',   None, _('Less Opaque'), 'a', None, self.less_opaque_cb),
            ('Eraser',       None, _('Toggle Eraser Mode'), 'e', None, self.eraser_cb), # TODO: make toggle action
            ('PickContext',  None, _('Pick Context (layer, brush and color)'), 'w', None, self.pick_context_cb),

            ('Darker',       None, _('Darker'), '<Shift>s', None, self.darker_cb),
            ('Warmer',       None, _('Warmer'), None, None, self.warmer_cb),
            ('Cooler',       None, _('Cooler'), None, None, self.cooler_cb),
            ('Purer',        None, _('Purer'), None, None, self.purer_cb),
            ('Grayer',       None, _('Grayer'), None, None, self.grayer_cb),
            ('Bigger',       None, _('Bigger'), 'f', None, self.brush_bigger_cb),

            # Context actions are also added in init_context_actions
            ('ContextStore', None, _('Save to Most Recently Restored'), 'q', None, self.context_cb),

            ('ClearLayer',   gtk.STOCK_CLEAR, _('Clear'), 'Delete', None, self.clear_layer_cb),
            ('CopyLayer',          gtk.STOCK_COPY, _('Copy to Clipboard'), '<control>C', None, self.copy_cb),
            ('PasteLayer',         gtk.STOCK_PASTE, _('Paste Clipboard (Replace Layer)'), '<control>V', None, self.paste_cb),
            ('PickLayer',    gtk.STOCK_JUMP_TO, _('Select Layer at Cursor'), 'h', None, self.pick_layer_cb),
            ('LayerFG',      gtk.STOCK_GO_UP, _('Next (above current)'),  'Page_Up', None, self.layer_fg_cb),
            ('LayerBG',      gtk.STOCK_GO_DOWN, _('Next (below current)'), 'Page_Down', None, self.layer_bg_cb),
            ('NewLayerFG',   gtk.STOCK_ADD, _('New (above current)'), '<Shift>Up', None, self.new_layer_cb),
            ('NewLayerBG',   None, _('New (below current)'), '<Shift>Down', None, self.new_layer_cb),
            ('MergeLayer',   gtk.STOCK_DND_MULTIPLE, # XXX need a batter one, but stay consistent with layerswindow for now
                             _('Merge Down'), '<Control>BackSpace', None, self.merge_layer_cb),
            ('RemoveLayer',  gtk.STOCK_DELETE, _('Remove'), '<Shift>BackSpace', None, self.remove_layer_cb),
            ('IncreaseLayerOpacity', None, _('Increase Layer Opacity'),  'p', None, self.layer_increase_opacity),
            ('DecreaseLayerOpacity', None, _('Decrease Layer Opacity'),  'o', None, self.layer_decrease_opacity),

            ('ShortcutsMenu', None, _('Shortcuts')),

            ('ResetView',   gtk.STOCK_ZOOM_FIT, _('Reset and Center'), 'semicolon', None, self.reset_view_cb),
            ('ResetMenu',   None, _('Reset')),
                ('ResetZoom',   gtk.STOCK_ZOOM_100, _('Zoom'), None, None, self.reset_view_cb),
                ('ResetRotation',   None, _('Rotation'), None, None, self.reset_view_cb),
                ('ResetMirror', None, _('Mirror'), None, None, self.reset_view_cb),
            ('ZoomIn',       gtk.STOCK_ZOOM_IN, _('Zoom In (at cursor)'), 'period', None, self.zoom_cb),
            ('ZoomOut',      gtk.STOCK_ZOOM_OUT, _('Zoom Out'), 'comma', None, self.zoom_cb),
            ('RotateLeft',   None, _('Rotate Counterclockwise'), '<control>Left', None, self.rotate_cb),
            ('RotateRight',  None, _('Rotate Clockwise'), '<control>Right', None, self.rotate_cb),
            ('MirrorHorizontal', None, _('Mirror Horizontal'), 'i', None, self.mirror_horizontal_cb),
            ('MirrorVertical', None, _('Mirror Vertical'), 'u', None, self.mirror_vertical_cb),
            ('SoloLayer',    None, _('Layer Solo'), 'Home', None, self.solo_layer_cb), # TODO: make toggle action
            ('ToggleAbove',  None, _('Hide Layers Above Current'), 'End', None, self.toggle_layers_above_cb), # TODO: make toggle action
        ]

--- /home/opt/mypaint/share/mypaint/gui/drawwindow.py
Code:
actions = [
            # name, stock id, label, accelerator, tooltip, callback
            ('FileMenu',    None, _('File')),
            ('Quit',         gtk.STOCK_QUIT, _('Quit'), None, None, self.quit_cb),
            ('FrameWindow',  None, _('Document Frame...'), None, None, self.toggleWindow_cb),
            ('FrameToggle',  None, _('Toggle Document Frame'), None, None, self.toggle_frame_cb),

            ('EditMenu',        None, _('Edit')),
            ('PreferencesWindow', gtk.STOCK_PREFERENCES, _('Preferences...'), '<Shift>b', None, self.toggleWindow_cb),

            ('ColorMenu',    None, _('Color')),
            ('ColorPickerPopup',    gtk.STOCK_COLOR_PICKER, _('Pick Color'), 'r', None, self.popup_cb),
            ('ColorHistoryPopup',  None, _('Color History'), 'x', None, self.popup_cb),
            ('ColorChangerPopup', None, _('Color Changer'), 'v', None, self.popup_cb),
            ('ColorRingPopup',  None, _('Color Ring'), None, None, self.popup_cb),
            ('ColorSelectionWindow',  gtk.STOCK_SELECT_COLOR, _('Color Triangle...'), 'g', None, self.toggleWindow_cb),
            ('ColorSamplerWindow',  gtk.STOCK_SELECT_COLOR, _('Color Sampler...'), 't', None, self.toggleWindow_cb),

            ('ContextMenu',  None, _('Brushkeys')),
            ('ContextHelp',  gtk.STOCK_HELP, _('Help!'), None, None, self.show_infodialog_cb),

            ('LayerMenu',    None, _('Layers')),
            ('LayersWindow', gtk.STOCK_INDEX, _('Layers...'), 'l', None, self.toggleWindow_cb),
            ('BackgroundWindow', gtk.STOCK_PAGE_SETUP, _('Background...'), 'backslash', None, self.toggleWindow_cb),

            ('BrushMenu',    None, _('Brush')),
            ('BrushSelectionWindow',  None, _('Brush List...'), 'b', None, self.toggleWindow_cb),
            ('BrushSettingsWindow',   gtk.STOCK_PROPERTIES, _('Brush Editor...'), '<control>b', None, self.toggleWindow_cb),
            ('ImportBrushPack',       gtk.STOCK_OPEN, _('Import brush package...'), '', None, self.import_brush_pack_cb),

            ('HelpMenu',   None, _('Help')),
            ('Docu', gtk.STOCK_INFO, _('Where is the Documentation?'), None, None, self.show_infodialog_cb),
            ('ShortcutHelp',  gtk.STOCK_INFO, _('Change the Keyboard Shortcuts?'), None, None, self.show_infodialog_cb),
            ('About', gtk.STOCK_ABOUT, _('About MyPaint'), '?', None, self.about_cb),

            ('DebugMenu',    None, _('Debug')),
            ('PrintMemoryLeak',  None, _('Print Memory Leak Info to stdout (Slow!)'), None, None, self.print_memory_leak_cb),
            ('RunGarbageCollector',  None, _('Run Garbage Collector Now'), None, None, self.run_garbage_collector_cb),
            ('StartProfiling',  gtk.STOCK_EXECUTE, _('Start/Stop Python Profiling (cProfile)'), None, None, self.start_profiling_cb),
            ('InputTestWindow',  None, _('Test input devices...'), None, None, self.toggleWindow_cb),
            ('GtkInputDialog',  None, _('GTK input devices dialog...'), None, None, self.gtk_input_dialog_cb),


            ('ViewMenu', None, _('View')),
            ('ShowPopupMenu',    None, _('Popup Menu'), '<control>minus', None, self.popupmenu_show_cb),
            ('Fullscreen',   gtk.STOCK_FULLSCREEN, _('Fullscreen'), '<Shift>f', None, self.fullscreen_cb),
            ('ToggleSubwindows',    None, _('Toggle Subwindows'), 'tab', None, self.toggle_subwindows_cb),
            ('ViewHelp',  gtk.STOCK_HELP, _('Help'), None, None, self.show_infodialog_cb),
            ]

Last edited by xman; 2019-09-10 at 11:39.
 

The Following 2 Users Say Thank You to xman For This Useful Post:
Creativetone's Avatar
Posts: 502 | Thanked: 4,475 times | Joined on Feb 2010 @ Finland
#2
Originally Posted by xman View Post
Though I couldn't figure out how to change some of the keys (like the spacebar/pan - if anyone knows please help)
Hi, xman!
This is my solution to pan problem:
drawwindow.py (line 284)
Code:
if key == keysyms.space or keysyms.v
and line (297)
Code:
if event.keyval == keysyms.space or keysyms.v
so I just add another key to do same as spacebar

and it is strange that accelmap.conf works for me.
if I update MyPaint all my shortcuts are still the same.
(/home/user/.mypaint/accelmap.conf)
__________________
Tone aka Creativetone aka Luovatone

Apple iPad Air 3 & iPad mini 5 | Apple Pencil
MacBook Pro 13-inch | Intuos Pro S, Cintiq 27QHD
iPhone XS Max | Main phone
Nokia N900 x2 | OC 1,15 GHz | MyPaint 0.9.1 for Fremantle | Tone's Brush Set X


www.tonikasurinen.fi
www.facebook.com/tonikasurinenartist
www.instagram.com/tonikasurinenartist
 

The Following User Says Thank You to Creativetone For This Useful Post:
Posts: 562 | Thanked: 1,732 times | Joined on Jan 2010 @ NYC
#3
Thanks tone! For what ever reason my accelmap weren't working before, but seem to be okay.... very happy now.

I had tried the 2 keysyms. mod earlier but they also didn't work. But I looked into it again and it seems like I had a conflicting keys assigned already
Code:
 # Context actions are also added in init_context_actions
            ('ContextStore', None, _('Save to Most Recently Restored'), 'q', None, self.context_cb),
&
Code:
; (gtk_accel_path "<Actions>/WindowActions/ContextStore" "q")
So after I removed those it work perfectly. Thanks for you help!

x
 
wooorm's Avatar
Posts: 163 | Thanked: 899 times | Joined on Jun 2010 @ sweet dreams
#4
hehe nice, tnx too,
gimp + 'phsp' : ))) = mypaint
#'just dont say ni' : ))))

and aqua in image Tree in agua is blender render : o )

but like a author this image and this aqua i say that this aqua is hand made too : )

worm

Last edited by wooorm; 2011-06-01 at 10:58.
 
Reply


 
Forum Jump


All times are GMT. The time now is 18:11.