Commit graph

77 commits

Author SHA1 Message Date
Ben Loftis
e557245bf7 implement group_override_modifier() (lib part)
Consistently use Tertiary for Group Override on all platforms (and be consistent about it)

Consistently use Primary-mod for Momentary on all platforms (partially reverts 47932f)
Primary modifier is used for fine-adjust on knobs and sliders, with no analogous operation on switches.
2022-06-21 13:01:30 -05:00
Robin Gareus
47932fb7bf
Only special case middle-click modifier for macOS by default 2022-06-20 23:30:45 +02:00
Ben Loftis
fd9a76073b modifiers: add momentary_push_name (for tooltips) 2022-06-17 11:07:58 -05:00
Ben Loftis
12e703414d modifiers: make a new abstraction for momentary-click, instead of button_2 (lib part)
is_button2_event()  was used to detect the user's desire for a
  momentary-click on some buttons (mute, solo, mixer scenes)

is_momentary_push_event() disambiguates this action from is_button2_event()

for the special case of momentary, we can drop the workarounds for
  the lack of middle-mouse buttons on Mac, and instead just use
  shift+left-click on all platforms.
2022-06-17 11:07:49 -05:00
Ben Loftis
71833911a4 modifiers: publish button2_name (for use in tooltips) 2022-06-17 10:52:06 -05:00
Paul Davis
7bf89ce109 Constification: make Stateful::get_state() const, with all other required const-ness added (libs) 2022-04-06 21:56:59 -06:00
Paul Davis
6db261d566 libgtkmm2ext: modify Keyboard handling of close-current-dialog
1) if there is no current dialog, allow some other window to handle the keyboard event
2) make the binding (which is hard coded) visible as static members of Keyboard
2021-04-26 10:48:20 -06:00
Paul Davis
920a77f6af add debug trace to code that actually saves bindings to disk 2020-04-12 08:57:59 -06:00
Paul Davis
6f4e838a58 add a signal to Gtkmm2ext::Keyboard to allow (possible) handling of close-current-dialog 2019-11-06 16:25:30 -07:00
Robin Gareus
e0d5c1426c
NO-OP: fix some Wimplicit-fallthrough
gcc can recognize various regexps in comments. Since C++17 provides
[[fallthrough]], using /* fallthrough */ consistently seems
appropriate until we switch to C++17.

see also https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
2019-09-18 17:37:54 +02:00
Robin Gareus
cec5ce8f45
Update canvas/UI lib GPL boilerplate and (C) from git log 2019-08-03 15:53:17 +02:00
Tim Mayberry
1f3589b122 Use XMLNode::get/set_property API in Gtkmm2ext::Keyboard class 2017-04-19 09:36:55 +10:00
Robin Gareus
9cc068756b Clean up existing bindings on reset 2017-03-13 20:09:10 +01:00
Paul Davis
545f5bee87 changes to adapt to modified version of GTK/Quartz which uses only MOD2 for Command, everywhere.
The default version of GTK2/Quartz uses MOD2+META for keys and MOD2 for scroll, which is
basically insane
2016-12-13 07:02:08 -05:00
Tim Mayberry
8d70b76059 Fix restoration of key bindings assigned to Windows+key, bug #7037
Windows key generates Mod4+Super (at least with the version of Gdk we use on
linux) so for bindings using the Windows key to work, GDK_SUPER_MASK has to be
added to modifier mask.
2016-10-26 12:03:17 +10:00
Paul Davis
99c8e51918 manually revert b9cab93fb1 and remove associated code.
For the last time, because of how GDK works, Keyboard::PrimaryModifier on MacOS MUST include MOD2 ***AND** META
2016-09-29 12:01:50 -04:00
Robin Gareus
a83febb268 fix optimized build compilation 2016-08-19 22:38:10 +02:00
Paul Davis
45cd3482a2 fix failure to remove keyvalue from Keyboard::state on key release 2016-08-19 08:32:44 -04:00
nick_m
c62026b567 Ensure RelevantModifierKeyMask is updated on each modifier change.
- fixes bug where changing prefs in User Interaction
	  only took effect on restart.
2016-08-14 03:04:54 +10:00
Paul Davis
b9cab93fb1 fix definition of PrimaryModifier for Keyboard for OS X 2016-08-08 17:59:11 -04:00
Paul Davis
1a55e83e98 move show_gdk_event_state() utility function from gtk2_ardour to libs/gtkmm2ext 2016-07-18 14:41:25 -04:00
Paul Davis
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
Paul Davis
ae4e84fd51 provide some Keyboard:: methods to get access to other versions of modifier names 2016-06-21 08:58:38 -04:00
Paul Davis
73f3abedea make it possible to disable VisibilityTracker's use of WM visibility 2016-06-07 18:29:03 -04:00
Paul Davis
17ace643e4 OMNIBUS COMMIT: prefer const XMLNode::property method (and provide a real one) 2016-05-04 23:09:45 -04:00
Paul Davis
21c3d17ae1 fix merge/rebase mistake 2016-02-22 15:31:26 -05:00
Paul Davis
d2a6fec03a additional GTKOSX => __APPLE__ changes missed in previous commit 2016-02-22 15:31:25 -05:00
Paul Davis
fbc985f913 set PrimaryModifier on OS X to match the actual bits used by GTK for Command 2016-02-22 15:31:24 -05:00
Paul Davis
bc487bb4b0 replicate the remove-all-trailing whitespace commit(s) in master 2016-02-22 15:31:24 -05:00
Paul Davis
589f2a1ab8 change suffix of keybinding files to ".keys" to avoid conflict with earlier versions.
Move some code around that should never have been inside libs/ardour to begin with.
2016-02-22 15:31:24 -05:00
Paul Davis
949163f806 more changes to Bindings, Keyboard APIs 2016-02-22 15:31:24 -05:00
Paul Davis
67e19c177f radically change Keyboard/Binding API design to disconnect Gtk::Action lookup from binding definition
We need this because we need binding information/objects before all
Actions have been defined.
2016-02-22 15:31:24 -05:00
Paul Davis
f028a6bffb fix memory lifetime management issue 2016-02-22 15:31:24 -05:00
Paul Davis
36023db8aa change/extend/rework Bindings API to allow replacement and provide stub/hook/call to save bindings 2016-02-22 15:31:23 -05:00
Paul Davis
04a9ce757c initial compilable version of saving key bindings with "new" scheme 2016-02-22 15:31:23 -05:00
Paul Davis
0f17508e6c changes to Bindings and Keyboard API to support (mostly) GTK-free keyboard bindings 2016-02-22 15:31:23 -05:00
Paul Davis
86d27a736c better system for managing kbd focus after cmd-w closing a dialog.
Key, Button and Focus In events in the editor+mixer windows cause the respective window to be noted
as the window to which focus should return after a dialog is closed with cmd/ctrl-w
2016-02-22 14:03:55 -05:00
Paul Davis
3a08ac5e1f os x: an initial attempt at fixing loss of keyboard focus after cmd-w to close dialog 2016-02-22 11:49:17 -05:00
Paul Davis
344cf05540 OS X: fix the handling of SUPER,HYPER,META (see code comment for more) 2016-02-21 10:48:35 -05:00
Paul Davis
c92e822332 remove HYPER,SUPER,META modifier masks from Keyboard::RelevantModifierMask so that modifier_state_equals() works on OS X
GTK on OS X adds META when Command is pressed even though it also uses MOD2 to indicate COMMAND. So Cmd-w was actually META-MOD2-w and modifier_state_equals(MOD2)
would fail. This should have nothing but good side effects
2016-02-18 09:44:50 -05:00
Paul Davis
dd7649a409 add a static utility function (should really be in utils.cc and public) to show modifier state in english; use said function 2016-02-18 09:43:03 -05:00
Robin Gareus
52e75f5a45 remove cruft 2015-10-20 15:49:59 +02:00
Robin Gareus
f1a6d7816d remove unused "copy modifier hint" 2015-10-20 11:12:36 +02:00
nick_m
9511c9c86f Add tooltips to user config preferences. clean up combo ordering. 2015-10-20 00:53:30 +11:00
Robin Gareus
2397429e99 use quotes for in-tree pbd/glib wrapper include 2015-10-05 22:15:18 +02:00
Robin Gareus
dc36b063bf remove unused fstream includes 2015-10-05 22:15:18 +02:00
Robin Gareus
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
Paul Davis
4dc63966f0 globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
2015-10-04 14:51:05 -04:00
Robin Gareus
7ac691ec82 use pbd's gstdio compatibility wrapper 2015-09-17 14:37:57 +02:00
nick_m
e8a0b1c514 Swap default snap modifiers (non-OSX) to avoid potential upgrade pain.
- Disable snap now defaults to alt
	- Snap absolute now defaults to alt-windows
2015-05-24 05:50:31 +10:00