Skip to content
Browse files

Allow layout to be set on non KB devices

Closes issue #449
  • Loading branch information...
tatokis committed Jul 28, 2019
1 parent 10c2b54 commit 263ffd93f39221c593b705258845afcd5c189d7a
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/gui/kbwidget.cpp
@@ -77,8 +77,8 @@ KbWidget::KbWidget(QWidget *parent, Kb *_device) :
ui->hwSaveButton->setToolTip(QString(tr("Saving to hardware is not supported on this device.")));
// Read keyboard layout
// Read device layout
// Clear the "Default" value

@@ -99,7 +99,7 @@ KbWidget::KbWidget(QWidget *parent, Kb *_device) :
KeyMap::Layout layout = settingsLayout = KeyMap::getLayout(settings.value("hwLayout").toString());
if(layout == KeyMap::NO_LAYOUT){
// If the layout hasn't been set yet, first check if one was set globally from a previous version
// If not, try and pick an appropriate one that's supported by the hardware
// If not, try to pick an appropriate one that's supported by the hardware
KeyMap::Layout oldLayout = KeyMap::getLayout(CkbSettings::get("Program/KbdLayout").toString());
if(oldLayout == KeyMap::NO_LAYOUT){
layout = KeyMap::locale(&layoutnames);

0 comments on commit 263ffd9

Please sign in to comment.
You can’t perform that action at this time.