zepp-health / zeppos-samples

A collection of samples about Zepp OS watchfaces and applications
Apache License 2.0
153 stars 55 forks source link

What key it is used as KEY_SHORTCUT in Simulator? #22

Closed leenzhu closed 1 year ago

leenzhu commented 2 years ago

Hi,

After reading the document use-the-keyboard-to-simulate-the-physical-keys-of-the-real-machine, I found there are only two key map.

So what key it is used as KEY_SHORTCUT of GTR4?

leenzhu commented 2 years ago

Another question, it seems KEY_SHORTCUT not work in physical watch too.

onKey({
  callback: (key, keyEvent) => {
    if (key === KEY_SHORTCUT) {
      console.log('shortcut, skip default key')
      return true 
   }
}
})

The log never print, and it seems shortcut key not caught by onKey(), by the way my watch is GTR4.

Xuemuyang commented 2 years ago

The first question: the SHORT_CUT key can be simulated by the menu key on the keyboard, if there is no menu key on the keyboard, you need to simulate the oxff67 key value.

We will improve this document as soon as possible, and add a separate key to support the SHORT_CUT key position.

Second question: The GTR 4 firmware temporarily disables the SHORT_CUT key event.

leenzhu commented 2 years ago

@Xuemuyang Thanks for reply.

If I use this key to launch built-in app, it works as expected, no matter how times I press the key, while if I use it to launch other mini app, it will lanuch the app again and again while I click the key many times.

The use case when the shortkey clicked, I expect is:

  1. wake up watch if the screen is off.
  2. launch my app if it is not launched
  3. perform my custom fucntion if my app is ready launched.

So the this key enabled, I could click it at most 3 times to trigger my function. I don't even need to look at the screen with the vibrator feedback.

The SHORTCUT is really handy. Is there any plan to enable it ?

I'm not sure whether it is appropriate to ask question here. I'm tring to develop an app for gtr4, I still have a lot of questions, I also tried to join slack, but I failed. If there is a better place for disscussing please let me know.

duanxiong commented 2 years ago

@leenzhu What happened when you tried to join slack? You can try this link again: https://join.slack.com/t/zeppcommunity/shared_invite/zt-1j9qah9oi-8b~vVqYYJo79AhM9lBOKzQ

duanxiong commented 2 years ago

For developers who can speak chinese, it's recommended to join the Lark Group (more chinese developers here, maybe you need to install Lark/飞书 firstly): https://www.feishu.cn/invitation/page/add_contact/?token=330m9e0d-26e9-413b-9c44-c2e608dbd72f&unique_id=EYVdVeud3gMJAYBpVBcnoQ==

leenzhu commented 2 years ago

@leenzhu What happened when you tried to join slack? You can try this link again: https://join.slack.com/t/zeppcommunity/shared_invite/zt-1j9qah9oi-8b~vVqYYJo79AhM9lBOKzQ

This link works.

The link https://t.zepp.com/t/zepp-community-slack at the bottom of page https://docs.zepp.com/docs/intro/ tells:

image

duanxiong commented 2 years ago

@leenzhu Welcome to join the slack community! We will fix the link ASAP at our website.

Xuemuyang commented 2 years ago

@leenzhu

Thank you very much for your advice, from my personal point of view, your idea is very cool.

SHORTCUT will be open in a later version, we are currently discussing a more suitable open format, and your suggestion is very inspiring for us.

Thank you very much for your feedback, the Slack link issue will be fixed immediately.

leenzhu commented 2 years ago

Glade to hear that! Looking forward to this feature.