MultiButton icon indicating copy to clipboard operation
MultiButton copied to clipboard

132行 连击加长按会在短时延时到时时会触发一次按下按键吧?

Open wangda123yuan opened this issue 3 years ago • 1 comments

第133行是不是想写成 handle->state = 1;

wangda123yuan avatar Mar 23 '22 09:03 wangda123yuan

确实存在该问题,修改为如下代码可解决:

  case 3:
    if(handle->button_level != handle->active_level) { //released press up
      handle->event = (uint8_t)PRESS_UP;
      EVENT_CB(PRESS_UP);
      if(handle->ticks < SHORT_TICKS) {
        handle->ticks = 0;
        handle->state = 2; //repeat press
      } else {
        handle->state = 0;
      }
    } else if(handle->ticks > SHORT_TICKS) { // long press up
      handle->state = 1; // 0修改为1
    }
    break;

Advanced-lj avatar Aug 15 '23 08:08 Advanced-lj