vkeybd: allow to disable keyboard input #8377
This commit is contained in:
parent
ec6237d703
commit
fb2d33c6a3
@ -35,6 +35,9 @@ void
|
|||||||
PianoKeyBindings::set_layout (Layout layout)
|
PianoKeyBindings::set_layout (Layout layout)
|
||||||
{
|
{
|
||||||
switch (layout) {
|
switch (layout) {
|
||||||
|
case NO_KEYS:
|
||||||
|
clear_notes ();
|
||||||
|
break;
|
||||||
case QWERTY:
|
case QWERTY:
|
||||||
bind_keys_qwerty ();
|
bind_keys_qwerty ();
|
||||||
break;
|
break;
|
||||||
@ -91,11 +94,13 @@ PianoKeyBindings::layout (std::string const& l)
|
|||||||
return S_QWERTY;
|
return S_QWERTY;
|
||||||
} else if (l == "QWERTZ Single") {
|
} else if (l == "QWERTZ Single") {
|
||||||
return S_QWERTZ;
|
return S_QWERTZ;
|
||||||
|
} else if (l == "None") {
|
||||||
|
return NO_KEYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unrecognized keyboard layout, maybe an assert is too stringent though
|
// Unrecognized keyboard layout, maybe an assert is too stringent though
|
||||||
assert(false);
|
assert(false);
|
||||||
return QWERTY;
|
return NO_KEYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char*
|
const char*
|
||||||
|
@ -36,6 +36,7 @@ public:
|
|||||||
~PianoKeyBindings ();
|
~PianoKeyBindings ();
|
||||||
|
|
||||||
enum Layout {
|
enum Layout {
|
||||||
|
NO_KEYS,
|
||||||
QWERTY,
|
QWERTY,
|
||||||
QWERTZ,
|
QWERTZ,
|
||||||
AZERTY,
|
AZERTY,
|
||||||
|
@ -3086,6 +3086,7 @@ RCOptionEditor::RCOptionEditor ()
|
|||||||
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_vkeybd_layout)
|
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_vkeybd_layout)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
vkeybdlayout->add ("None", _("Mouse-only (no keyboard)"));
|
||||||
vkeybdlayout->add ("QWERTY", _("QWERTY"));
|
vkeybdlayout->add ("QWERTY", _("QWERTY"));
|
||||||
vkeybdlayout->add ("QWERTZ", _("QWERTZ"));
|
vkeybdlayout->add ("QWERTZ", _("QWERTZ"));
|
||||||
vkeybdlayout->add ("AZERTY", _("AZERTY"));
|
vkeybdlayout->add ("AZERTY", _("AZERTY"));
|
||||||
|
Loading…
Reference in New Issue
Block a user