Glfw: GLFW_PRESS 按键保持一段时间后松开

创建于 2017-03-07  ·  4评论  ·  资料来源: glfw/glfw

Linux Ubuntu
glfw 编译时间信息:3.1.2 X11 GLX clock_gettime /dev/js XI Xf86vm shared
运行时 glfw 版本:3.1.2

void App::key_callback(GLFWwindow*, int key, int, int action, int)
{
    if(action == GLFW_PRESS)
        keys.pressEvent(key);
    else if(action == GLFW_RELEASE)
        keys.releaseEvent(key);
}

按任意键后,我按预期获得 GLFW_PRESS(动作),然后在按住它并释放后按给定顺序执行以下动作:
-GLFW_RELEASE
-GLFW_PRESS
-GLFW 发布

额外的按下和释放操作导致我的应用程序出现延迟。 我在 windows 和 mac os 上没有这个问题。

glfw 编译时间信息:3.3.0 X11 GLX EGL clock_gettime /dev/js shared
运行时 glfw 版本:3.3.0

还是行不通

X11 bug duplicate verified

所有4条评论

0000007a 到 1 在 12,784:按键 0x0041 扫描码 0x0026 (A) (a)(没有模组)被按下
0000007b 到 1 在 12,788:字符 0x00000061 (a) 带有修饰符(没有修饰符)输入
0000007c 到 1 在 12,788:字符 0x00000061 (a) 输入
0000007d 到 1 在 13,284:重复了密钥 0x0041 扫描码 0x0026 (A) (a)(无模组)
0000007e 到 1 在 13,288:字符 0x00000061 (a) 带有修饰符(没有修饰符)输入
0000007f 到 1 在 13,288:字符 0x00000061 (a) 输入
00000080 到 1 在 13,316:重复了密钥 0x0041 扫描码 0x0026 (A) (a)(无模组)
00000081 到 1 在 13,320:字符 0x00000061 (a) 带修饰符(无修饰符)输入
00000082 到 1 在 13,320:字符 0x00000061 (a) 输入
00000083 to 1 at 13,347: Key 0x0041 Scancode 0x0026 (A) (a) (with no mods) is重复
00000084 到 1 在 13,352:字符 0x00000061 (a) 带有修饰符(没有修饰符)输入
00000085 到 1 在 13,352:字符 0x00000061 (a) 输入
00000086 到 1 在 13,377:重复了密钥 0x0041 扫描码 0x0026 (A) (a)(无模组)
00000087 到 1 在 13,382:字符 0x00000061 (a) 带修饰符(无修饰符)输入
00000088 到 1 在 13,382:字符 0x00000061 (a) 输入
00000089 到 1 at 13,408: Key 0x0041 Scancode 0x0026 (A) (a) (with no mods) 被重复
0000008a 到 1 在 13,413:字符 0x00000061 (a) 带有修饰符(没有修饰符)输入
0000008b 到 1 在 13,413:字符 0x00000061 (a) 输入
0000008c 到 1 在 13,439:重复了密钥 0x0041 扫描码 0x0026 (A) (a)(无模组)
0000008d 到 1 在 13,443:字符 0x00000061 (a) 带有修饰符(没有修饰符)输入
0000008e 到 1 在 13,444:字符 0x00000061 (a) 输入
0000008f 到 1 在 13,470:重复了密钥 0x0041 扫描码 0x0026 (A) (a)(无模组)
00000090 到 1 在 13,475:字符 0x00000061 (a) 带修饰符(无修饰符)输入
00000091 到 1 在 13,475:字符 0x00000061 (a) 输入
00000092 to 1 at 13,501: Key 0x0041 Scancode 0x0026 (A) (a) (with no mods) is重复
00000093 到 1 在 13,506:字符 0x00000061 (a) 带有修饰符(没有修饰符)输入
00000094 到 1 在 13,506:字符 0x00000061 (a) 输入
00000095 到 1 在 13,532:重复了密钥 0x0041 扫描码 0x0026 (A) (a)(无模组)
00000096 到 1 在 13,537:字符 0x00000061 (a) 带修饰符(无修饰符)输入
00000097 到 1 在 13,537:字符 0x00000061 (a) 输入
00000098 到 1 在 13,565:重复密钥 0x0041 扫描码 0x0026 (A) (a)(无模组)
00000099 到 1 在 13,571:字符 0x00000061 (a) 带修饰符(无修饰符)输入
0000009a 到 1 在 13,571:字符 0x00000061 (a) 输入
0000009b 到 1 在 13,594:重复了密钥 0x0041 扫描码 0x0026 (A) (a)(无模组)
0000009c 到 1 在 13,596:字符 0x00000061 (a) 带有修饰符(没有修饰符)输入
0000009d 到 1 在 13,596:字符 0x00000061 (a) 输入
0000009e to 1 at 13,611: Key 0x0041 Scancode 0x0026 (A) (a) (with no mods)

嗯它似乎在事件测试中正常工作。

现在应该使用 4ff66a7818e3eaa5362c828a18220b12f1cd9bc8 修复此问题。

作品! :)

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

elmindreda picture elmindreda  ·  4评论

dmitshur picture dmitshur  ·  4评论

Tbwas picture Tbwas  ·  4评论

leo150 picture leo150  ·  4评论

GraemeWilde picture GraemeWilde  ·  3评论