#ifdef GTKOSX
uint Keyboard::PrimaryModifier = GDK_MOD2_MASK; // Command
-guint Keyboard::SecondaryModifier = GDK_CONTROL_MASK; // Alt/Option
+guint Keyboard::SecondaryModifier = GDK_CONTROL_MASK; // Control
guint Keyboard::TertiaryModifier = GDK_SHIFT_MASK; // Shift
-guint Keyboard::Level4Modifier = GDK_MOD1_MASK; // Control
+guint 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;
#endif
+guint Keyboard::GainFineScaleModifier = Keyboard::PrimaryModifier;
+guint Keyboard::GainExtraFineScaleModifier = Keyboard::SecondaryModifier;
+
Keyboard* Keyboard::_the_keyboard = 0;
Gtk::Window* Keyboard::current_window = 0;
bool Keyboard::_some_magic_widget_has_focus = false;
keyval = event->keyval;
}
+ if (keyval == GDK_Shift_L) {
+ /* There is a special and rather hacky situation in Editor which makes
+ it useful to know when a shift key has been released, so emit a signal
+ here (see Editor::_stepping_axis_view)
+ */
+ ShiftReleased (); /* EMIT SIGNAL */
+ }
+
if (event->type == GDK_KEY_PRESS) {
if (find (state.begin(), state.end(), keyval) == state.end()) {
if (event->type == GDK_KEY_RELEASE && modifier_state_equals (event->state, PrimaryModifier)) {
switch (event->keyval) {
case GDK_w:
- if (current_window) {
- current_window->hide ();
- current_window = 0;
- ret = true;
- }
+ close_current_dialog ();
+ ret = true;
break;
}
}
return ret;
}
+void
+Keyboard::close_current_dialog ()
+{
+ if (current_window) {
+ current_window->hide ();
+ current_window = 0;
+ }
+}
+
bool
Keyboard::key_is_down (uint32_t keyval)
{
return true;
}
-