Physical modifier abstraction is constant
This commit is contained in:
parent
9ae9282547
commit
af38528174
@ -60,10 +60,11 @@ public:
|
||||
typedef std::vector<uint32_t> State;
|
||||
typedef uint32_t ModifierMask;
|
||||
|
||||
static uint32_t PrimaryModifier;
|
||||
static uint32_t SecondaryModifier;
|
||||
static uint32_t TertiaryModifier;
|
||||
static uint32_t Level4Modifier;
|
||||
static const uint32_t PrimaryModifier;
|
||||
static const uint32_t SecondaryModifier;
|
||||
static const uint32_t TertiaryModifier;
|
||||
static const uint32_t Level4Modifier;
|
||||
|
||||
static uint32_t CopyModifier;
|
||||
static uint32_t RangeSelectModifier;
|
||||
static uint32_t GainFineScaleModifier;
|
||||
@ -88,30 +89,6 @@ public:
|
||||
static const char* tertiary_modifier_short_name ();
|
||||
static const char* level4_modifier_short_name ();
|
||||
|
||||
static void set_primary_modifier (uint32_t newval)
|
||||
{
|
||||
set_modifier (newval, PrimaryModifier);
|
||||
}
|
||||
static void set_secondary_modifier (uint32_t newval)
|
||||
{
|
||||
set_modifier (newval, SecondaryModifier);
|
||||
}
|
||||
static void set_tertiary_modifier (uint32_t newval)
|
||||
{
|
||||
set_modifier (newval, TertiaryModifier);
|
||||
}
|
||||
static void set_level4_modifier (uint32_t newval)
|
||||
{
|
||||
set_modifier (newval, Level4Modifier);
|
||||
}
|
||||
static void set_copy_modifier (uint32_t newval)
|
||||
{
|
||||
set_modifier (newval, CopyModifier);
|
||||
}
|
||||
static void set_range_select_modifier (uint32_t newval)
|
||||
{
|
||||
set_modifier (newval, RangeSelectModifier);
|
||||
}
|
||||
|
||||
bool key_is_down (uint32_t keyval);
|
||||
guint modifier_state ();
|
||||
@ -138,6 +115,15 @@ public:
|
||||
|
||||
static bool no_modifiers_active (guint state);
|
||||
|
||||
static void set_copy_modifier (uint32_t newval)
|
||||
{
|
||||
set_modifier (newval, CopyModifier);
|
||||
}
|
||||
static void set_range_select_modifier (uint32_t newval)
|
||||
{
|
||||
set_modifier (newval, RangeSelectModifier);
|
||||
}
|
||||
|
||||
static void set_snap_modifier (guint);
|
||||
static void set_snap_delta_modifier (guint);
|
||||
static void set_edit_button (guint);
|
||||
|
@ -64,10 +64,11 @@ guint Keyboard::insert_note_mod = GDK_CONTROL_MASK;
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
||||
guint Keyboard::PrimaryModifier = GDK_MOD2_MASK; // Command
|
||||
guint Keyboard::SecondaryModifier = GDK_CONTROL_MASK; // Control
|
||||
guint Keyboard::TertiaryModifier = GDK_SHIFT_MASK; // Shift
|
||||
guint Keyboard::Level4Modifier = GDK_MOD1_MASK; // Alt/Option
|
||||
guint const Keyboard::PrimaryModifier = GDK_MOD2_MASK; // Command
|
||||
guint const Keyboard::SecondaryModifier = GDK_CONTROL_MASK; // Control
|
||||
guint const Keyboard::TertiaryModifier = GDK_SHIFT_MASK; // Shift
|
||||
guint const Keyboard::Level4Modifier = GDK_MOD1_MASK; // Alt/Option
|
||||
|
||||
guint Keyboard::CopyModifier = GDK_CONTROL_MASK; // Control
|
||||
guint Keyboard::RangeSelectModifier = GDK_SHIFT_MASK;
|
||||
guint Keyboard::button2_modifiers = Keyboard::SecondaryModifier | Keyboard::Level4Modifier;
|
||||
@ -129,10 +130,11 @@ guint Keyboard::snap_delta_mod = Keyboard::Level4Modifier;
|
||||
|
||||
#else
|
||||
|
||||
guint Keyboard::PrimaryModifier = GDK_CONTROL_MASK; // Control
|
||||
guint Keyboard::SecondaryModifier = GDK_MOD1_MASK; // Alt/Option
|
||||
guint Keyboard::TertiaryModifier = GDK_SHIFT_MASK; // Shift
|
||||
guint Keyboard::Level4Modifier = GDK_MOD4_MASK | GDK_SUPER_MASK; // Mod4/Windows
|
||||
guint const Keyboard::PrimaryModifier = GDK_CONTROL_MASK; // Control
|
||||
guint const Keyboard::SecondaryModifier = GDK_MOD1_MASK; // Alt/Option
|
||||
guint const Keyboard::TertiaryModifier = GDK_SHIFT_MASK; // Shift
|
||||
guint const Keyboard::Level4Modifier = GDK_MOD4_MASK | GDK_SUPER_MASK; // Mod4/Windows
|
||||
|
||||
guint Keyboard::CopyModifier = GDK_CONTROL_MASK;
|
||||
guint Keyboard::RangeSelectModifier = GDK_SHIFT_MASK;
|
||||
guint Keyboard::button2_modifiers = 0; /* not used */
|
||||
|
Loading…
Reference in New Issue
Block a user