Skip to content

Commit

Permalink
Correctly map continuous backspace to down-longpress
Browse files Browse the repository at this point in the history
  • Loading branch information
WinSuk committed Jan 22, 2014
1 parent bf5900b commit 980b58a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion watchapp/appinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"longName": "PebbleType",
"companyName": "WinSuk",
"versionCode": 1,
"versionLabel": "0.5.0",
"versionLabel": "0.5.1",
"watchapp": {
"watchface": false
},
Expand Down
6 changes: 3 additions & 3 deletions watchapp/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ static void backspace_timer_callback(void *data) {
}
}

void up_long_click_handler(ClickRecognizerRef recognizer, void *context) {
void down_long_click_handler(ClickRecognizerRef recognizer, void *context) {
// Start deleting stuff
is_up_held = true;
app_timer_register(150 /*milliseconds */, backspace_timer_callback, NULL);
}

void up_long_click_release_handler(ClickRecognizerRef recognizer, void *context) {
void down_long_click_release_handler(ClickRecognizerRef recognizer, void *context) {
// Stop deleting stuff
is_up_held = false;
}
Expand All @@ -128,7 +128,7 @@ static void click_config_provider(void *context) {
window_single_click_subscribe(BUTTON_ID_UP, up_click_handler);
window_single_click_subscribe(BUTTON_ID_DOWN, down_click_handler);
window_long_click_subscribe(BUTTON_ID_SELECT, 700, select_long_click_handler, select_long_click_release_handler);
window_long_click_subscribe(BUTTON_ID_UP, 700, up_long_click_handler, up_long_click_release_handler);
window_long_click_subscribe(BUTTON_ID_DOWN, 700, down_long_click_handler, down_long_click_release_handler);
}

static void timer_callback(void *data) {
Expand Down

0 comments on commit 980b58a

Please sign in to comment.