当手写笔“抬起”时会发生什么? 在平板电脑上?

发布于 2024-07-05 13:49:50 字数 667 浏览 8 评论 0原文

我正在 VC++/Win32/MFC 中处理一个遗留项目。 最近,要求应用程序在平板电脑上运行,这带来了许多新问题。 我已经能够处理并解决这些问题,但我还剩下一个可以使用一些专家建议的问题。

我有一个由手写笔“抬起”而引起的特殊错误的活性表面。 基本上,鼠标光标会消失,然后当您将其“按”回屏幕上时又会重新出现。

申请中没有考虑到这一点是有道理的。 您无法在台式电脑上抬起光标。 因此,我正在寻找的是对电梯发生时发生的情况(在 Windows 消息等方面)的良好概述。 这是否仅意味着焦点更改和鼠标悬停事件? 我的错误似乎还涉及光标更改(尽管可能与升降机无关)。 当然,意外的“提升”正在破坏应用程序的工具处理状态。

所以具体的问题是:

  1. 当手写笔“抬起”时会发生什么? 新闻界?
  2. 可以使用哪些 API 调用来检测这一点? 它是否只是转换为设置了标志/值的标准消息?
  3. 当您的开发电脑是台式机时,测试/模拟此功能的好方法是什么? 我只是盲目地在这里吗? (我只能定期访问平板电脑)
  4. 什么代表平板电脑手写笔感知的正确行为或最佳实践?

感谢您的考虑, 乙醚

I am working on a legacy project in VC++/Win32/MFC. Recently it became a requirement that the application work on a tablet pc, and this ushered in a host of new issues.
I have been able to work with, and around these issues, but am left with one wherein I could use some expert suggestions.

I have a particular bug that is induced by the "lift" of the stylus off of the active surface. Basically the mouse cursor disappears and then reappears when you "press" it back onto the screen.

It makes sense that this is unaccounted for in the application. you can't lift the cursor on a desktop pc. So what I am looking for is a good overview on what happens (in terms of windows messages, etc.) when the lift occurs. Does this translate to just focus changes and mouseover events? My bug seems to also involve cursor changes (may not be lift related though). Certainly the unexpected "lift" is breaking the state of the application's tool processing.

So the tangible questions are:

  1. What happens when a stylus "lift" occurs? A press?
  2. What API calls can be used to detect this? Does it just translate into standard messages with flags/values set?
  3. Whats a good way to test/emulate this when your development pc is a desktop? Am I just flying blind here? (I only have periodic access to a tablet pc)
  4. What represents correct behavior or best practice for tablet stylus awareness?

Thanks for your consideration,
ee

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

各空 2024-07-12 13:49:50

据我了解,不存在“抬起”事件——唯一的事件发生在手写笔稍后返回屏幕时。 当然这取决于你具体的驱动等等。

更糟糕的是,您所描述的错误可能只需使用典型的鼠标即可重现。 尝试尽可能快地移动鼠标——它几乎肯定会同时跳跃几个像素。 如果您将鼠标设置配置为最高指针速度,甚至可以是数十个或数百个。 一次更新后,鼠标可能会达到 100,100。 下一次更新可能是 200,300。

As I understand it, there is no "lift" event -- the only event happens when the stylus is brought back to the screen later. Of course, this depends on your specific driver and so on.

Worse, the bug you describe might be reproducible with just a typical mouse. Try moving the mouse as fast as you can -- it will almost certainly jump several pixels at once. Or even dozens or hundreds, if you have the mouse settings configured for the highest pointer speed. One update, the mouse might be at 100,100. The very next update, it could be at 200,300.

安人多梦 2024-07-12 13:49:50

作为一名平板电脑用户,我可以回答您的一些问题。

第一的:

当手写笔必须拖出聚焦窗口才能按下虚拟键盘上的按键时,您无法轻松地将“键盘焦点”保持在窗口上。

我使用过的大多数虚拟键盘(Windows 平板电脑输入面板和 ubuntu 下的一个)都允许他们输入的程序保持“键盘焦点”。

当手写笔“抬起”时会发生什么? 新闻界?

在Windows下,压力值下降,但除此之外,没有任何事件。 (我不知道linux。)

可以使用哪些 API 调用来检测此情况? 它是否只是转换为设置了标志/值的标准消息?

如上所述,如果您可以获得压力值,则可以使用它。

当您的开发电脑是台式机时,测试/模拟此功能的好方法是什么? 我只是盲目地在这里吗? (我只能定期使用平板电脑)

当手写笔放在其他地方时,指针的全局坐标会发生变化,因此,您可以使用任何允许更改全局指针值的东西来模拟指针的突然移动。 (Java 中的 Robot 类使这变得相当简单。)

什么代表平板电脑手写笔感知的正确行为或最佳实践?

我建议你阅读微软的说法,MSDN 网站上有很多优秀的文章。 (http://msdn.microsoft.com/en-我们/库/ms704849(VS.85).aspx)
我要指出的是,应用程序上按钮的大小会产生巨大的差异。

希望这有帮助。

As a tablet user I can answer a few of your questions.

First:

You cannot very easily keep a "keyboard focus" on a window when the stylus has to trail out of the focused window to push a key on the virtual keyboard.

Most of the virtual keyboards I've used (The windows tablet input panel and one under ubuntu) allow the program they are typing in to keep "keyboard focus."

What happens when a stylus "lift" occurs? A press?

Under Windows, the pressure value drops, but outside of that, there is no event. (I don't know about linux.)

What API calls can be used to detect this? Does it just translate into standard messages with flags/values set?

As mentioned above, if you can get the pressure value, you can use that.

Whats a good way to test/emulate this when your development pc is a desktop? Am I just flying blind here? (I only have periodic access to a tablet pc)

When the stylus is placed down elsewhere, the global coordinates of the pointer change, so, you can emulate the sudden pointer move with anything that allows you to change the global pointer values. (The Robot class in Java makes this fairly easy.)

What represents correct behavior or best practice for tablet stylus awareness?

I'd recommend you read what Microsoft has to say, the MSDN website has a number of excellent articles. (http://msdn.microsoft.com/en-us/library/ms704849(VS.85).aspx)
I'll point out that the size of the buttons on your applications makes a HUGE difference.

Hope this was of help.

诺曦 2024-07-12 13:49:50

@Greg - 澄清一下,这是一台内置集成平板电脑和手写笔的笔记本电脑。该设备没有专用键盘(它是触摸屏上的虚拟键盘),也不是 wacom 输入设备。 对困惑感到抱歉。

似乎有一个

@Greg - A clarification, this is a laptop pc with integrated tablet and stylus built in. the device has no dedicated keyboard (it is a virtual one on the touchscreen) and is not a wacom input device. Sorry for the confusion.

It appears that there is an SDK for the Microsoft Windows XP Tablet PC Edition that may have the ability to get special details such as pressure. However, I know that there has to be some level of standard compatibility with existing non-tablet-aware applications. I guess I can try to get Spy++ installed on the tablet and try and filter down to specific messages/events.

清风不识月 2024-07-12 13:49:50

在Windows下,压力值下降,但除此之外,没有任何事件。 (我不了解linux。)

在Linux下,你会得到“ProximityEvents”

这些事件很可能在Windows中可用(请参阅:http://www.wacomeng.com/devsupport/ibmpc/wacomwindevfaq.html )

Under Windows, the pressure value drops, but outside of that, there is no event. (I don't know about linux.)

Under linux you`ll get "ProximityEvents"

Most likely these events WT_PROXIMITY are avaliable in windows (please refer to: http://www.wacomeng.com/devsupport/ibmpc/wacomwindevfaq.html )

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文