SurfaceKeyboard与Surface.Core和XNA [英] SurfaceKeyboard with Surface.Core and XNA

查看:104
本文介绍了SurfaceKeyboard与Surface.Core和XNA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试从SurfaceKeyboard捕获基于XNA的应用程序的输入,但无法确定从哪里开始。  我发现这个
文章但我没有知道如何直接调用Shell键盘API ..非常感谢教程,示例等的任何链接。

I've been trying to catch input from the SurfaceKeyboard for an XNA based application, but can't really figure out where to start.  I found this article but I don't know how to call the Shell keyboard API directly..  any links to tutorials, examples, etc, would be hugely appreciated.

谢谢

推荐答案

您应该能够使用与硬件键盘输入相同的API检测Surface键盘的输入。 我不是XNA开发人员,但可以快速搜索

xna键盘输入
出现了一些有趣的链接。

You should be able to detect input from the Surface keyboard using the same APIs that you'd use for hardware keyboard input.  I'm not an XNA developer, but a quick seach for xna keyboard input turned up some interesting links.

如果您的问题是如何显示键盘,请看一下
SurfaceKeyboard类
。 您可能最感兴趣的是IsVisible,CenterX / CenterY,旋转和布局属性。 我想说,当你希望用户看到键盘时,第一步就是将SurfaceKeyboard.IsVisible设置为true。

If your question is how to display the keyboard, take a look at the SurfaceKeyboard class.  You'll probably be most interested in the IsVisible, CenterX/CenterY, Rotation, and Layout properties.  I'd say that the first step would be to set SurfaceKeyboard.IsVisible to true when you want the user to see the keyboard.

如果你已经尝试过这个并且没有看到键盘,也许问题是Surface Shell没有运行? 键盘由Shell托管,因此您必须运行Shell才能使键盘可见。

If you've tried this and aren't seeing the keyboard, perhaps the problem is that the Surface Shell is not running?  The keyboard is hosted by the Shell, so you have to have Shell running for the keyboard to be visible.


这篇关于SurfaceKeyboard与Surface.Core和XNA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆