I’m trying to create a new shotcut to MyPaint:
F1 = Brush DEEVAD/LARGE HARD EREASER
All other positions (1 ~ 0) I used with others brushes and I need more (kkkk)…
I try this lines in accelmap.conf, but didnt work…
; (gtk_accel_path “/DocumentActions/Context10s” “F1”)
; (gtk_accel_path “/DocumentActions/Context10” “F1”)
If I open MyPaint didnt work. After close MyPaint and reopen accelmap.conf, this lines above disappear…
The number of save/restore slots are hard coded in the file gui/document.py, specifically in the method _init_context_actions. To add more slots you would need to change the constant 10 in that function to the number of slots you want, and set up shortcuts for those new slots (since Ctrl+10 is not a valid shortcut).
Also note that:
your new lines are commented out (they start with a semicolon)
the action names, if they existed, would still have a leading 0 after Context, so instead of Context10 it would be Context010.
So in short, there is unfortunately no easy way to do this yet.
In the file
…\mingw64\lib\mypaint\gui\document.py
I changed the line 454: (20 instead 10 - just to make a hard test)
450 def _init_context_actions(self):
451 “”“Internal: initializes several brush shortcut-key actions”“”
452 ag = self.action_group
453 context_actions = [ ]
454 for x in range(20):
No more necessary edit accelmap.conf, because now we find all options to change in the Menu Preferences (picture below)
1 - Change in def _init_context_actions(self) - …\mingw64\lib\mypaint\gui\document.py
for x in range( XX )
2 - In …\mingw64\lib\mypaint\gui\brushmanager.py use the same number above (XX)
_NUM_BRUSHKEYS = XX
3 - in menu Preferences/Keys configure the key combination
IF POSSIBLE, I would like to request for the next versions of MyPaint that the default are 13 brushes, instead of 10, because normally the keyboard has 13 available keys (especially the blue highlighted)