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)
|
||||
{
|
||||
switch (layout) {
|
||||
case NO_KEYS:
|
||||
clear_notes ();
|
||||
break;
|
||||
case QWERTY:
|
||||
bind_keys_qwerty ();
|
||||
break;
|
||||
@ -91,11 +94,13 @@ PianoKeyBindings::layout (std::string const& l)
|
||||
return S_QWERTY;
|
||||
} else if (l == "QWERTZ Single") {
|
||||
return S_QWERTZ;
|
||||
} else if (l == "None") {
|
||||
return NO_KEYS;
|
||||
}
|
||||
|
||||
// Unrecognized keyboard layout, maybe an assert is too stringent though
|
||||
assert(false);
|
||||
return QWERTY;
|
||||
return NO_KEYS;
|
||||
}
|
||||
|
||||
const char*
|
||||
|
@ -36,6 +36,7 @@ public:
|
||||
~PianoKeyBindings ();
|
||||
|
||||
enum Layout {
|
||||
NO_KEYS,
|
||||
QWERTY,
|
||||
QWERTZ,
|
||||
AZERTY,
|
||||
|
@ -3086,6 +3086,7 @@ RCOptionEditor::RCOptionEditor ()
|
||||
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_vkeybd_layout)
|
||||
);
|
||||
|
||||
vkeybdlayout->add ("None", _("Mouse-only (no keyboard)"));
|
||||
vkeybdlayout->add ("QWERTY", _("QWERTY"));
|
||||
vkeybdlayout->add ("QWERTZ", _("QWERTZ"));
|
||||
vkeybdlayout->add ("AZERTY", _("AZERTY"));
|
||||
|
Loading…
Reference in New Issue
Block a user