
Don't hardcode modifier masks in the wheel and keyboard input controllers. Instead, hardcode accelerator strings and get the right modifier mask from gtk_accelerator_parse() at runtime. This turns e.g. "<Shift><Primary>" into Shift+Cmd on OS X and into Shift+Ctrl on X11 and Windows. Also rename the events accordingly and change the event names in the default controllerrc. Unrelated: reorder the actions so the ones with less modifiers are listed first, and change the order of action matching to match the actions with most modifiers (the last ones) first.
65 lines
2.9 KiB
Plaintext
65 lines
2.9 KiB
Plaintext
# GIMP controllerrc
|
|
|
|
(GimpControllerInfo "Main Mouse Wheel"
|
|
(enabled yes)
|
|
(debug-events no)
|
|
(controller "GimpControllerWheel")
|
|
(mapping
|
|
(map "scroll-up-alt" "tools-opacity-increase-skip")
|
|
(map "scroll-down-alt" "tools-opacity-decrease-skip")
|
|
(map "scroll-up-primary-alt" "context-gradient-select-next")
|
|
(map "scroll-down-primary-alt" "context-gradient-select-previous")
|
|
(map "scroll-up-shift-alt" "context-pattern-select-next")
|
|
(map "scroll-down-shift-alt" "context-pattern-select-previous")
|
|
(map "scroll-up-shift-primary" "context-brush-select-next")
|
|
(map "scroll-down-shift-primary" "context-brush-select-previous")
|
|
(map "scroll-up-shift-primary-alt" "context-font-select-next")
|
|
(map "scroll-down-shift-primary-alt" "context-font-select-previous")))
|
|
|
|
(GimpControllerInfo "Main Keyboard"
|
|
(enabled yes)
|
|
(debug-events no)
|
|
(controller "GimpControllerKeyboard")
|
|
(mapping
|
|
(map "cursor-up-shift" "view-scroll-page-up")
|
|
(map "cursor-down-shift" "view-scroll-page-down")
|
|
(map "cursor-left-shift" "view-scroll-page-left")
|
|
(map "cursor-right-shift" "view-scroll-page-right")
|
|
(map "cursor-up-primary" "view-scroll-top-border")
|
|
(map "cursor-down-primary" "view-scroll-bottom-border")
|
|
(map "cursor-left-primary" "view-scroll-left-border")
|
|
(map "cursor-right-primary" "view-scroll-right-border")
|
|
(map "cursor-up-alt" "tools-value-1-increase-skip")
|
|
(map "cursor-down-alt" "tools-value-1-decrease-skip")
|
|
(map "cursor-left-alt" "tools-value-1-decrease")
|
|
(map "cursor-right-alt" "tools-value-1-increase")))
|
|
|
|
# (GimpControllerInfo "Linux Input Example"
|
|
# (enabled yes)
|
|
# (debug-events no)
|
|
# (controller "ControllerLinuxInput"
|
|
# (device "/dev/input/event2"))
|
|
# (mapping
|
|
# (map "wheel-turn-left" "tools-value-2-decrease")
|
|
# (map "wheel-turn-right" "tools-value-2-increase")))
|
|
|
|
# (GimpControllerInfo "Midi Example"
|
|
# (enabled yes)
|
|
# (debug-events no)
|
|
# (controller "ControllerMidi"
|
|
# (device "/dev/midi01")
|
|
# (channel 0))
|
|
# (mapping
|
|
# (map "controller-000" "context-foreground-red-set")
|
|
# (map "controller-001" "context-foreground-green-set")
|
|
# (map "controller-002" "context-foreground-blue-set")
|
|
# (map "controller-004" "context-background-red-set")
|
|
# (map "controller-005" "context-background-green-set")
|
|
# (map "controller-006" "context-background-blue-set")
|
|
# (map "controller-008" "context-brush-radius-set")
|
|
# (map "controller-009" "context-brush-hardness-set")
|
|
# (map "controller-010" "context-brush-aspect-set")
|
|
# (map "controller-011" "context-brush-angle-set")))
|
|
|
|
# end of controllerrc
|