Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
custom mouse values for inner mousearea
  • Loading branch information
locusf committed Oct 13, 2013
1 parent 2b01fe9 commit 47baa29
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions nemo-keyboard/org/nemomobile/KeyboardBase.qml
Expand Up @@ -67,14 +67,21 @@ MouseArea {
MouseArea {
width: parent.width
height: parent.height
property int _startlX
property int _startlY
onPressed: {
_startlX = mouse.x
_startlY = mouse.y
}

onPositionChanged: {
if ((mouse.y + _startY < (height * 0.2))) {
if ((mouse.y + _startlY < (height * 0.2))) {
MInputMethodQuick.sendKey(Qt.Key_Up)
}else if ((mouse.y - _startY > (height * 0.2))) {
}else if ((mouse.y - _startlY > (height * 0.2))) {
MInputMethodQuick.sendKey(Qt.Key_Down)
}else if ((mouse.x - _startX < (width * 0.2))) {
}else if ((mouse.x - _startlX < (width * 0.2))) {
MInputMethodQuick.sendKey(Qt.Key_Left)
}else if ((mouse.x + _startX > (width * 0.2))) {
}else if ((mouse.x + _startlX > (width * 0.2))) {
MInputMethodQuick.sendKey(Qt.Key_Right)
}
}
Expand Down

0 comments on commit 47baa29

Please sign in to comment.