Skip to content

Commit

Permalink
Merge branch 'master' into 'master'
Browse files Browse the repository at this point in the history
Changing caps lock staying on after layout change

@rainemak

See merge request !20
  • Loading branch information
pvuorela committed Mar 13, 2017
2 parents d9596bc + 950ab70 commit 851c577
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
8 changes: 4 additions & 4 deletions qml/Key.qml
Expand Up @@ -161,7 +161,7 @@ Rectangle {
keyRepeatStarter.stop();
keyRepeatTimer.stop();
key.color = keyboard.keyBgColor;
keyboard.currentKeyPressed = 0;
keyboard.currentKeyPressed = null;

if (sticky && !becomesSticky) {
keyboard.keyModifiers &= ~code
Expand All @@ -184,7 +184,7 @@ Rectangle {
}

// first non-sticky press will cause the sticky to be released
if( !sticky && keyboard.resetSticky != 0 && keyboard.resetSticky !== key ) {
if( !sticky && keyboard.resetSticky && keyboard.resetSticky !== key ) {
resetSticky.setStickiness(0);
}
}
Expand All @@ -211,7 +211,7 @@ Rectangle {
function setStickiness(val)
{
if(sticky) {
if( keyboard.resetSticky != 0 && keyboard.resetSticky !== key ) {
if( keyboard.resetSticky && keyboard.resetSticky !== key ) {
resetSticky.setStickiness(0)
}

Expand All @@ -230,7 +230,7 @@ Rectangle {
keyboard.keyModifiers &= ~code
}

keyboard.resetSticky = 0
keyboard.resetSticky = null

if(stickiness==1) {
stickIndicator.anchors.topMargin = key.height/2
Expand Down
12 changes: 7 additions & 5 deletions qml/Keyboard.qml
Expand Up @@ -23,9 +23,9 @@ Item {
id: keyboard

property int keyModifiers
property variant resetSticky: 0
property variant currentStickyPressed: null
property variant currentKeyPressed: 0
property Key resetSticky
property Key currentStickyPressed
property Key currentKeyPressed

property string keyFgColor: "#ffffff"
property string keyBgColor: "#202020"
Expand Down Expand Up @@ -59,10 +59,11 @@ Item {
spacing: keyboard.keyspacing
Repeater {
id: colRepeater

property int rowIndex: index
model: keyLoader.vkbColumns()
delegate: Key {
property variant keydata: keyLoader.keyAt(colRepeater.rowIndex, index)
property var keydata: keyLoader.keyAt(colRepeater.rowIndex, index)
label: keydata[0]
code: keydata[1]
label_alt: keydata[2]
Expand All @@ -85,7 +86,7 @@ Item {
}

onCurrentKeyPressedChanged: {
if(currentKeyPressed != 0 && currentKeyPressed.currentLabel.length === 1 && currentKeyPressed.currentLabel !== " ") {
if(currentKeyPressed && currentKeyPressed.currentLabel.length === 1 && currentKeyPressed.currentLabel !== " ") {
visualKeyFeedbackRect.label = currentKeyPressed.currentLabel
visualKeyFeedbackRect.width = currentKeyPressed.width*1.5
visualKeyFeedbackRect.height = currentKeyPressed.height*1.5
Expand All @@ -111,6 +112,7 @@ Item {
Qt.quit();
}
}
keyboard.keyModifiers = 0
// makes the keyboard component reload itself with new data
keyboardLoader.sourceComponent = undefined
keyboardLoader.sourceComponent = keyboardContents
Expand Down
2 changes: 1 addition & 1 deletion qml/LayoutWindow.qml
Expand Up @@ -22,7 +22,7 @@ import QtQuick 2.0
PopupWindow {
id: layoutWindow

property variant layouts: [""]
property var layouts: [""]

Component {
id: listDelegate
Expand Down
2 changes: 1 addition & 1 deletion qml/Lineview.qml
Expand Up @@ -23,7 +23,7 @@ import FingerTerm 1.0
Rectangle {
id: lineView

property variant lines: [""]
property var lines: [""]
property int fontPointSize: util.fontSize
property int cursorX: 1
property int cursorWidth: 10
Expand Down
2 changes: 1 addition & 1 deletion qml/UrlWindow.qml
Expand Up @@ -22,7 +22,7 @@ import QtQuick 2.0
PopupWindow {
id: urlWindow

property variant urls: [""]
property var urls: [""]

Component {
id: listDelegate
Expand Down

0 comments on commit 851c577

Please sign in to comment.