简体   繁体   English

为Windows 10开发自定义虚拟键盘

[英]Developing a custom virtual keyboard for Windows 10

I would like to create a custom virtual keyboard for touch on Windows 10. I am primarily a developer but if Windows 10 Dev is anything like the previous version, I'll probably have to revert back to C/C++. 我想在Windows 10上创建一个用于触摸的自定义虚拟键盘​​。我主要是一个开发人员,但如果Windows 10 Dev与之前的版本类似,我可能不得不恢复到C / C ++。 I want to be able to define everything, shape, regions, and data that it spits out when keys are pressed. 我希望能够定义按下按键时吐出的所有内容,形状,区域和数据。

Windows 10 has a keyboard selection menu (see picture), I would like it to integrate with this so that it can be used with the native keyboard interfaces. Windows 10有一个键盘选择菜单(见图),我希望它与它集成,以便它可以与本机键盘接口一起使用。

在此输入图像描述

I'm an experienced programmer of business applications but I have no idea where to start with this. 我是一位经验丰富的商业应用程序员,但我不知道从哪里开始。 I saw this article for a Windows 7 keyboard but I'm hoping that things have changed for Windows 10. 我看到这篇文章用于Windows 7键盘,但我希望Windows 10的内容已经发生了变化。

My questions are: 我的问题是:

  1. Is it possible to create a custome virtual keyboard that integrates natively? 是否有可能创建一个本地集成的客户虚拟键盘?
  2. How do I integrate it with the Windows 10 Virtual Keyboard selector (pictured)? 如何将其与Windows 10虚拟键盘选择器(如图)集成?
  3. Where do I start? 我从哪里开始?

Any help/direction/words of wisdom would be appreciated. 任何帮助/方向/智慧的话将不胜感激。

Update: I think maybe I haven't explained it very well. 更新:我想也许我没有解释得很好。 I want to build a virtual keyboard that isn't in the same shape as a normal one and essentially works like a shortcut keyboard. 我想构建一个与普通键盘形状不同的虚拟键盘,基本上就像快捷键盘一样。 You tap a key and it insert a preset snippet of text in to the context window. 您点击一个键,它会将预设的文本片段插入上下文窗口。 And is selectable from the virtual keyboard options pictured (blue bit). 并且可以从图中的虚拟键盘选项中选择(蓝色位)。

Update: 更新:

I just tried using the Keyboard Layout Manager ... OMG, so much easier to use than MSKLC, and it works on Windows 10; 我刚尝试使用键盘布局管理器 ... OMG,比MSKLC更容易使用,它适用于Windows 10; but I was still seeing the "Unavailable input method" message. 但我仍然看到“不可用的输入法”消息。


Actually, I just added a custom layout using MS Keyboard Layout Creator . 实际上,我刚刚使用MS Keyboard Layout Creator添加了自定义布局。

Changing the layout also modifies how the physical keyboard maps keys . 更改布局还会修改物理键盘映射键的方式

The trick is you can develop a new layout on Windows 10, but you can't use the "Build DLL and Setup Package" method on Windows 10 because the program needs .NET frameworks 2.0. 诀窍是您可以在Windows 10上开发新的布局,但是您不能在Windows 10上使用“构建DLL和安装程序包”方法,因为该程序需要.NET frameworks 2.0。 I tried installing v2.0 on my system, but it just would not do it. 我尝试在我的系统上安装v2.0,但它不会这样做。 I was able to build the files on a Windows 8.1 system. 我能够在Windows 8.1系统上构建文件。

Steps to take: 采取的步骤:

  1. Download & install MS Keyboard Layout Creator on a Windows 8.1 or older systemv 在Windows 8.1或更早版本的systemv上下载并安装MS Keyboard Layout Creator
  2. Make sure .NET Framework 3.5 (includes .NET 2.0 and 3.0) or older is installed 确保安装了.NET Framework 3.5(包括.NET 2.0和3.0)或更早版本
  3. Design your layout; 设计你的布局; before saving, make sure to remember what base language is set. 保存之前,请务必记住设置的基本语言。
  4. Project > Validate Layout 项目>验证布局
  5. Project > Build DLL and Setup Package 项目>构建DLL和安装程序包
  6. A folder containing the following structure will be created ("mylayout" will be the name you chose) 将创建包含以下结构的文件夹(“mylayout”将是您选择的名称)

     mylayout |_ amd64 | |_ Mylayout.dll |_ i386 | |_ Mylayout.dll |_ ia64 | |_ Mylayout.dll | wow64 | |_ Mylayout.dll |_ Mylayout_amd64.msi |_ Mylayout_i386.msi |_ Mylayout_ia64.msi |_ setup.exe 
  7. Install the appropriate file 安装适当的文件

  8. The custom keyboard should now show up as a dropdown in the virtual keyboard, if not select "Language preferences". 现在,自定义键盘应显示为虚拟键盘中的下拉列表,如果不是,则选择“语言首选项”。
  9. You should now be on the "Country or Region" page. 您现在应该在“国家或地区”页面上。 From here if the keyboard is based on a language, the language will show up here, or it may be added in an existing language (eg "English (United States)")... click on the language, then select "Options". 如果键盘基于语言,则从这里开始,语言将显示在此处,或者可以使用现有语言添加(例如“英语(美国)”)...单击语言,然后选择“选项” 。
  10. You should see your custom keyboard added here. 您应该在此处看到自定义键盘。 If not, select "Additional date, time & regional settings", then "Change input methods". 如果没有,请选择“其他日期,时间和区域设置”,然后选择“更改输入法”。 Then click on the "Options" in the custom language. 然后单击自定义语言中的“选项”。 It should let you preview the layout from here. 它应该让你从这里预览布局。

Caveat : Initially, I chose a base "UK" layout & a Gaelic language option showed up. 警告 :最初,我选择了基本的“英国”布局和盖尔语言选项。 This did add an option to the virtual keyboard language selector, but on the second time around I started with a base US Dvorak layout and the selection would not show up for me. 确实为虚拟键盘语言选择器添加了一个选项,但在第二次我开始使用基本的美国Dvorak布局时,选择不会显示给我。 In the control panel input method section, I saw a "Unavailable input method" message. 在控制面板输入法部分,我看到了“不可用的输入法”消息。 I'm not sure how to get around that issue. 我不确定如何解决这个问题。

Maybe you'll have better luck. 也许你会有更好的运气。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM