Merge lp:~bfiller/ubuntu-keyboard/haptic-feedback into lp:ubuntu-keyboard

Proposed by Bill Filler
Status: Merged
Merged at revision: 159
Proposed branch: lp:~bfiller/ubuntu-keyboard/haptic-feedback
Merge into: lp:ubuntu-keyboard
Diff against target: 52 lines (+15/-3)
2 files modified
qml/KeyboardContainer.qml (+11/-0)
qml/keys/CharKey.qml (+4/-3)
To merge this branch: bzr merge lp:~bfiller/ubuntu-keyboard/haptic-feedback
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+209127@code.launchpad.net

Commit message

initial support for haptic feedback

Description of the change

initial support for haptic feedback

To post a comment you must log in.
Revision history for this message
Bill Filler (bfiller) wrote :

this works, but will give haptic feedback instead of audio feedback if the audio feedback setting is turned on.

TODO:
- make haptic feedback it's own setting
- make haptic/audio mutually exclusive
- add haptic setting switch to settings panel.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/KeyboardContainer.qml'
2--- qml/KeyboardContainer.qml 2014-01-20 00:09:37 +0000
3+++ qml/KeyboardContainer.qml 2014-03-03 20:14:14 +0000
4@@ -20,6 +20,7 @@
5 import "languages/"
6 import "keys/"
7 import UbuntuKeyboard 1.0
8+import QtFeedback 5.0
9
10 Item {
11 id: panel
12@@ -57,6 +58,16 @@
13 source: Qt.resolvedUrl("styles/ubuntu/sounds/key_tick2_quiet.wav")
14 }
15
16+ HapticsEffect {
17+ id: pressEffect
18+ attackIntensity: 0.0
19+ attackTime: 125
20+ intensity: 0.5
21+ duration: 75
22+ fadeTime: 125
23+ fadeIntensity: 0.0
24+ }
25+
26 states: [
27 State {
28 name: "CHARACTERS"
29
30=== modified file 'qml/keys/CharKey.qml'
31--- qml/keys/CharKey.qml 2013-11-15 12:31:04 +0000
32+++ qml/keys/CharKey.qml 2014-03-03 20:14:14 +0000
33@@ -137,9 +137,6 @@
34
35 onReleased: {
36 if (!extendedKeysShown) {
37- if (maliit_input_method.useAudioFeedback)
38- audioFeedback.play();
39-
40 event_handler.onKeyReleased(valueToSubmit, action);
41 if (!skipAutoCaps)
42 if (panel.activeKeypadState === "SHIFTED" && panel.state === "CHARACTERS")
43@@ -148,6 +145,10 @@
44 }
45 onPressed: {
46 event_handler.onKeyPressed(valueToSubmit, action);
47+ // TODO, add a setting for haptic feedback
48+ if (maliit_input_method.useAudioFeedback)
49+ pressEffect.start()
50+ //audioFeedback.play();
51 }
52 }
53

Subscribers

People subscribed via source and target branches