Commit Graph

36 Commits

Author SHA1 Message Date
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 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 cec5ce8f45
Update canvas/UI lib GPL boilerplate and (C) from git log 2019-08-03 15:53:17 +02: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 ae4e84fd51 provide some Keyboard:: methods to get access to other versions of modifier names 2016-06-21 08:58:38 -04: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 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 60c4b30b7e manually revert most of previous commit related to dialog/main window focus management 2016-02-22 13:55:31 -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
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
Robin Gareus 22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
nick_m b3a4c88e0e Make absolute snap the default snap.
- also fixes a couple of absolute snap bugs wrt midi notes.
2015-06-11 01:36:34 +10:00
nick_m 119c644dc0 Document snap_delta modifier mask. 2015-05-23 23:41:26 +10:00
nick_m 186736043c Move ui-centric modifiers into ArdourKeyboard, set some bad defaults.
- Also makes "Mod4" Appear as "Windows" and adds new combination
	"Alt-Windows" to the dropdown.
	- Attempt to set a pair of default snap modifiers (without
	knowing what it actually is for OSX)
	- Copy modifier now saves
	- Snap modifier modifier problem still remains.
2015-05-21 05:32:23 +10:00
nick_m ae0759ae88 Allow all drag -related modifiers to be set, re-instate "jump after trim"
- Copy modifier still doesn't save
	- Testers please edit the Extra section of ~/.ardourN/config to allow
	defaults to "take"
	- Note that the current defaults overlap.
	- warning - absolute snap modifier has no default and will be always
	"on" unless you set it!
2015-05-21 01:30:57 +10:00
nick_m 66221d1dea Add more modifier preferences.
Note that no defaults are set - go to prefs->user interaction to
	ensure that nothing is set to "no modifer"

	also - the copy modifier doesn't actually save its state yet.
2015-05-20 04:00:04 +10:00
nick_m aac167a19f "Lock" mode is now "Constrained", make snap absolute modifier configurable.
- user can abs/rel modifier key in prefs->user interaction
	  suggested for linux - absolute->alt ignore snap->alt-shift
	- Constrained mode works the same as button 2 drag (initial move
	  sets constraint axis).
2015-05-18 06:25:36 +10:00
nick_m 35f69656e8 Window focus handling fixes.
Many windows were not getting key events.
Use magic focus infrastructure (built for widgets) to deliver key events
via window focus in/out.
2015-04-02 02:41:49 +11:00
Paul Davis 8859ebe56e add Gtkmm2ext::Keyboard::reset_bindings() 2014-07-10 11:04:04 -04:00
Paul Davis 15471ca7dd add export control to libgtkmm2ext 2013-10-17 11:26:01 -04:00
Colin Fletcher 8e376f7a2a Fix special handling of 'zoom vertical' scroll wheel modifier key.
gtkmm2ext/keyboard.cc has a special case to emit a signal on the key-up of
the modifier key used to adjust track heights in conjunction with the
scroll wheel, so that the same track continues to be resized even when
it's shrunk to no longer be under the mouse cursor. However, this code
assumed that the modifier key for this was <Shift>.

Fix it to use the event->state bit corresponding to
ScrollZoomVerticalModifier instead, and rename the relevant functions to
clarify that it's the 'zoom vertical' modifier key they're dealing with.

Partially fixes #5610.
2013-07-23 16:42:34 +01:00
Colin Fletcher 21914c884e Make scroll-wheel modifier keys consistent in main editor window.
Add constants for the keyboard modifiers that should be used for vertical
zoom, horizontal zoom, and horizontal scrolling in the main editor window,
and use these where appropriate rather than using Keyboard::PrimaryModifier
and friends directly.
2013-06-21 20:13:44 +01:00
Carl Hetherington 95377c141c Hacky fix for track height step losing 'grip' on the
track being resized (#4503).


git-svn-id: svn://localhost/ardour2/branches/3.0@12747 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-17 16:57:21 +00:00
Carl Hetherington 6a4628e50a Use the same logic to decide on step size when scroll-wheeling faders in the mixer and knobs in the monitor section (part of #4726).
git-svn-id: svn://localhost/ardour2/branches/3.0@12510 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-31 18:04:47 +00:00
Paul Davis bef3ea1adc MCP: F1-7 jump to a given view; F8 closes any currently open dialog; in zoom mode, up/down alter vertical track height of all tracks; option-up/down alters selected track heights
git-svn-id: svn://localhost/ardour2/branches/3.0@11858 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-09 18:53:51 +00:00
Paul Davis 45d51d3aee various fixes to MidiRegionView selection handling, key handling, drawing of ghost notes (contains a fix for #4263); shift-drag selections in MidiRegionViews now correctly add to the selection rather than replacing any existing one.
git-svn-id: svn://localhost/ardour2/branches/3.0@10000 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-08-17 12:46:42 +00:00
Paul Davis 4624153d26 add static methods to Keyboard for keyboard modifier names
git-svn-id: svn://localhost/ardour2/branches/3.0@8364 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-29 16:27:43 +00:00
Paul Davis 7703f0a76a move generic parts of Keyboard into gtkmm2ext. imperfectly done, but makes modifiers available in libgtkmm2ext now
git-svn-id: svn://localhost/ardour2/branches/3.0@6288 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-04 22:51:32 +00:00