{"id":6190,"date":"2014-08-29T15:24:31","date_gmt":"2014-08-29T06:24:31","guid":{"rendered":"http:\/\/www.moonmile.net\/blog\/?p=6190"},"modified":"2014-08-29T15:32:09","modified_gmt":"2014-08-29T06:32:09","slug":"winrt-%e3%82%b9%e3%83%88%e3%82%a2%e3%82%a2%e3%83%97%e3%83%aa%e3%81%a7%e7%8b%ac%e8%87%aa%e3%81%ab%e3%82%ad%e3%83%bc%e3%82%b3%e3%83%bc%e3%83%89%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b%e6%96%b9","status":"publish","type":"post","link":"https:\/\/www.moonmile.net\/blog\/archives\/6190","title":{"rendered":"[WinRT] \u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u3067\u72ec\u81ea\u306b\u30ad\u30fc\u30b3\u30fc\u30c9\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>Surface \u306e\u5834\u5408\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u304c\u51fa\u308b\u306e\u3067\u307d\u3061\u307d\u3061\u3068\u6253\u3066\u3070\u3044\u3044\u306e\u3067\u3059\u304c\u3001PC \u74b0\u5883\u3067\u30b9\u30c8\u30a2\u30d7\u30ea\u3092\u4f7f\u3046\u6642\u306b\u306f\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u4f7f\u3063\u305f\u307b\u3046\u304c\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2014\/08\/wpid-dworkblogimage20140829_02org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2014\/08\/wpid-dworkblogimage20140829_02thum.jpg\" border=\"0\" \/><\/a><\/p>\n<p>\u304c\u3001XAML \u3067\u306f\u30ad\u30fc\u81ea\u4f53\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u62fe\u3046\u306e\u306f\u30d5\u30a9\u30fc\u30ab\u30b9\u306e\u3042\u308b\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3057\u304b\u62fe\u3048\u307e\u305b\u3093\u3002KeyDown, KeyUp \u306e\u30a4\u30d9\u30f3\u30c8\u304c\u767a\u751f\u3057\u306a\u3044\u3093\u3067\u3059\u3088\u306d\u3002\u3044\u304d\u304a\u3044\u3001\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9\u304c\u306a\u3044\u753b\u9762\u306b\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u4f7f\u3063\u3066\u5165\u529b\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3044\u3044\u306e\u304b\uff1f\u3068\u8abf\u3079\u3066\u307f\u307e\u3057\u305f\u3002\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u30a2\u30d7\u30ea\u306e\u3088\u3046\u306b\u3001\u30d5\u30a9\u30fc\u30e0\u81ea\u8eab\uff08\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\u3060\u304b\u3089 Page \u81ea\u8eab\uff09\u304b\u3089\u30ad\u30fc\u30a4\u30d9\u30f3\u30c8\u3092\u30d5\u30c3\u30af\u3057\u305f\u3044\u308f\u3051\u3067\u3059\u3002<\/p>\n<h2>\u25a0\u7d50\u8ad6\u304b\u3089\u8a00\u3048\u3070\u3067\u304d\u306a\u3044<\/h2>\n<p>Windows\u30b9\u30c8\u30a2\u30a2\u30d7\u30ea\uff1a \u6975\u610f7\uff1a \u30a2\u30d7\u30ea\u306f\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u3001\u30de\u30a6\u30b9\u3001\u30bf\u30c3\u30c1\u3067\u6a5f\u80fd\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b &#8211; Build Insider<br \/>\n<a href=\"http:\/\/www.buildinsider.net\/mobile\/winstoretips\/07\">http:\/\/www.buildinsider.net\/mobile\/winstoretips\/07<\/a><\/p>\n<p>\u8272\u3005\u63a2\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u7d50\u8ad6\u304b\u3089\u8a00\u3048\u3070\u300c\u3067\u304d\u307e\u305b\u3093\u300d\u3002\u306a\u3093\u3089\u304b\u306e\u30d5\u30a9\u30fc\u30ab\u30b9\u3092\u6301\u3064\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u5f35\u308a\u4ed8\u3051\u3066\u3001\u305d\u308c\u306b\u5bfe\u3057\u3066\u30ad\u30fc\u30dc\u30fc\u30c9\u64cd\u4f5c\u3092\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u306a\u306e\u3067\u3001\u753b\u9762\u306b\u30d5\u30a9\u30fc\u30ab\u30b9\u3092\u6301\u3064\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u304c\u3042\u308c\u3070\u3001\u305d\u308c\u306b Focus \u3092\u5f53\u3066\u3066\u3084\u3063\u3066\u3001\u305d\u3053\u304b\u3089\u30ad\u30fc\u30dc\u30fc\u30c9\u30a4\u30d9\u30f3\u30c8\u3092\u62fe\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3055\u3066\u3001\u81ea\u4f5c\u306e ChuPad \u306f\u3001TextBlock \u3060\u3051\u3067\u69cb\u6210\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u306b\u30d5\u30a9\u30fc\u30ab\u30b9\u3092\u4ed8\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u8868\u793a\u90e8\u5206\u306a\u308a\u5165\u529b\u90e8\u5206\u306a\u308a\u3092 TextBox \u306b\u3057\u3066\u3082\u3088\u3044\u306e\u3067\u3059\u304c\u3001look &amp; feel \u304c\u60aa\u3044\u3057\u3001\u7d75\u6587\u5b57\u306a\u308a\u753b\u50cf\u306a\u308a\u3092\u8cbc\u308a\u4ed8\u3051\u3088\u3046\u3068\u601d\u3046\u3068\u7d50\u69cb\u9762\u5012\u305d\u3046\u3067\u3059\uff08\u753b\u50cf\u306b\u95a2\u3057\u3066\u306f\u3001RichTextBox\u3092\u4f7f\u3046\u65b9\u6cd5\u3082\u3042\u308a\u307e\u3059\u304c\uff09\u3002<br \/>\n\u3053\u306e\u30d1\u30c3\u30c9\u81ea\u4f53\u306f\u3001\u30bf\u30d6\u30ec\u30c3\u30c8\u3084 Windows Phone \u3092\u60f3\u5b9a\u3059\u308b\u306e\u3067\u3001\u672c\u6765\u306a\u3089\u3070\u30ad\u30fc\u30dc\u30fc\u30c9\u304c\u7121\u3044\u74b0\u5883\u3067\u3064\u304b\u3044\u307e\u3059\u3002\u901a\u5e38\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u51fa\u3057\u3066\u3082\u3088\u3044\u306e\u3067\u3059\u304c\u3001\u5927\u304d\u3055\u304c\u3072\u3069\u3044\u306e\u3068\u3001Chu-lang \u7279\u6709\u306e\u7d75\u6587\u5b57\u306e\u9806\u756a\u306b\u3057\u305f\u3044\u3068\u3044\u3046\u4e8b\u60c5\u3082\u3042\u308b\u306e\u3067\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u90e8\u5206\u3092\u81ea\u4f5c\u3057\u305f\u3044\u306e\u3067\u3059\u3002<\/p>\n<p>\u3055\u3066\u3001\u3069\u3046\u3059\u308c\u3070\u3088\u3044\u306e\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<h2>\u25a0\u30d5\u30a9\u30fc\u30ab\u30b9\u3092\u6301\u3064\u81ea\u4f5c Control \u3092\u4f5c\u308b<\/h2>\n<p>Focus \u30e1\u30bd\u30c3\u30c9\u3092\u6301\u3066\u3070\u826f\u3044\u3068\u3044\u3046\u3053\u3068\u304c\u5206\u304b\u3063\u305f\u306e\u3067\u3001\u3068\u306a\u308c\u3070\u3001Focus \u30e1\u30bd\u30c3\u30c9\u3092\u6301\u3064\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u81ea\u4f5c\u3057\u3066\u3057\u307e\u3048\u3070\u3088\u3044\u306e\u3067\u3059\u3002\u3069\u3046\u305b\u753b\u9762\u306b\u3072\u3068\u3064\u3057\u305f\u30d5\u30a9\u30fc\u30ab\u30b9\u304c\u306a\u3044\u306e\u3067\u3059\u304b\u3089\u3001\u305d\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306b\u3042\u308f\u305b\u308c\u3070\u3088\u3044\u3067\u3057\u3087\u3046\u3001\u3068\u3044\u3046\u767a\u60f3\u3092\u3057\u307e\u3057\u305f\u3002<br \/>\n\u898b\u308b\u3068\u3001Focus \u30e1\u30bd\u30c3\u30c9\u3092\u6301\u3064\u306e\u306f\u3001Control \u30af\u30e9\u30b9\u306a\u306e\u3067\u3001\u81ea\u4f5c\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u4f5c\u308a\u307e\u3059\u3002\u305d\u306e\u4e2d\u3067\u3001KeyDown\/KeyUp \u306e\u51e6\u7406\u3092\u3059\u308c\u3070\u3088\u3044\u308f\u3051\u3067\u3059\u3002<\/p>\n<p>\u30de\u30a6\u30b9\u3084\u6307\u3067\u5225\u306e\u5834\u6240\u3092\u30bf\u30c3\u30d7\u3059\u308b\uff08\u3053\u306e\u5834\u5408\u306f\u3001\u7d75\u6587\u5b57\u30ad\u30fc\u30dc\u30fc\u30c9\u90e8\u5206\u3092\u30bf\u30c3\u30d7\u3059\u308b\uff09\u3068\u3001\u30d5\u30a9\u30fc\u30ab\u30b9\u304c\u5916\u308c\u308c\u3066\u30a4\u30d9\u30f3\u30c8\u304c\u53d6\u308c\u306a\u304f\u306a\u308b\u306e\u3067\u3001\u7121\u7406\u3084\u308a\u623b\u3057\u3066\u3084\u308a\u307e\u3059\u3002\u30bf\u30d6\u79fb\u52d5\u3067\u6b62\u307e\u308b\u3088\u3046\u306b IsTabStop = true \u306b\u3059\u308b\u306e\u3092\u5fd8\u308c\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\n\/\/\u5f37\u5236\u7684\u306b\u30d5\u30a9\u30fc\u30ab\u30b9\u3092\u8a2d\u5b9a\u3059\u308b\r\nthis.keycode.Focus(FocusState.Keyboard);\r\nthis.keycode.LostFocus += (s, e) =&gt; this.keycode.Focus(FocusState.Keyboard);\r\nthis.keycode.IsTabStop = true;\r\nthis.keycode.OnKeyPush += keycode_OnKeyPush;\r\n<\/pre>\n<p>\u3061\u306a\u307f\u306b\u3001\u81ea\u4f5c\u7d75\u6587\u5b57\u30ad\u30fc\u30dc\u30fc\u30c9\u304b\u3089\u3078\u306e\u6253\u3061\u8fbc\u307f\u306f\u3001\u305d\u308c\u305e\u308c\u306e TextBlock \u306b\u540d\u524d\u3092\u4ed8\u3051\u3066\u304a\u3044\u3066\u3001\u30b3\u30fc\u30c9\u4e0a\u3067\u4e00\u6c17\u306b Tapped \u30a4\u30d9\u30f3\u30c8\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nvar lst = new TextBlock&#x5B;] {\r\n    kLet, kLeft, kRight, kCat, kDog,\r\n    kIf, kThen, kElse, kEqual, kNEqual,\r\n    kFor, kTo, kFun, kTrue, kFalse,\r\n    kList, kHead, kTail, kPrint, kCase,\r\n};\r\nforeach (var it in lst)\r\n    it.Tapped += it_Tapped;\r\n<\/pre>\n<p>\u3053\u3093\u306a\u98a8\u306b\u914d\u5217\u3092\u4f7f\u3063\u3066\u8a2d\u5b9a\u3059\u308c\u3070\u30b3\u30fc\u30c9\u304c\u77ed\u304f\u306a\u308a\u307e\u3059\u306d\u3002\u3044\u3061\u3044\u3061 new \u3057\u306a\u304f\u3088\u3044 F# \u306e\u5f71\u97ff\u3067\u3059\u3002<\/p>\n<h2>\u25a0KeyDown\/KeyUp \u30a4\u30d9\u30f3\u30c8\u3092\u51e6\u7406\u3059\u308b<\/h2>\n<p>\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u62bc\u3057\u4e0b\u3052\/\u96e2\u3057\u305f\u3068\u304d\u306e\u30a4\u30d9\u30f3\u30c8\u304b\u3089\u4eee\u60f3\u30ad\u30fc\u30b3\u30fc\u30c9\u304c\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>VirtualKey Enumeration<br \/>\n<a href=\"http:\/\/msdn.microsoft.com\/ja-jp\/library\/windows\/apps\/windows.system.virtualkey(v=win.10).aspx\">http:\/\/msdn.microsoft.com\/ja-jp\/library\/windows\/apps\/windows.system.virtualkey(v=win.10).aspx<\/a><\/p>\n<p>\u3053\u306e enum \u3092\u3056\u3063\u3068\u898b\u3066\u308f\u304b\u308b\u3093\u3067\u3059\u304c\u3001\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u3057\u304b\u306a\u304f\u3066\u8a18\u53f7\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u300c@\u300d\u3068\u304b\u300c&#8221;\u300d\u3068\u304b\u306f\u3001\u3069\u3046\u3084\u3063\u3066\u5224\u5225\u3059\u308c\u3070\u3088\u3044\u306e\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>WPF \u306e\u5834\u5408\u306b\u306f\u3001<\/p>\n<p>KeyInterop.KeyFromVirtualKey Method (System.Windows.Input)<br \/>\n<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/system.windows.input.keyinterop.keyfromvirtualkey(v=vs.110).aspx\">http:\/\/msdn.microsoft.com\/en-us\/library\/system.windows.input.keyinterop.keyfromvirtualkey(v=vs.110).aspx<\/a><\/p>\n<p>\u3092\u4f7f\u3063\u3066\u30b3\u30f3\u30d0\u30fc\u30c8\u3059\u308b\u306e\u3067\u3059\u304c\u3001WinRT \u3067\u306f\u4f7f\u3048\u306a\u3044\u3002<\/p>\n<p>\u4ed5\u65b9\u304c\u306a\u3044\u306e\u3067\u3001\u30b7\u30d5\u30c8\u30ad\u30fc\u306e\u62bc\u3057\u4e0b\u3052\u306a\u3069\u3092\u5224\u5225\u3057\u3066\u3001JIS\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u30a8\u30df\u30e5\u30ec\u30fc\u30c8\u3057\u307e\u3059\uff08\u82f1\u8a9e\u5411\u3051\u306a\u306e\u3067\u3001ASCII\u30ad\u30fc\u30dc\u30fc\u30c9\u3082\u7528\u610f\u3057\u306a\u3044\u3068\u99c4\u76ee\u3067\u3059\u304c\uff09\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nvoid makeKeycode()\r\n{\r\n    KCs = new KC&#x5B;] {\r\n        new KC( VirtualKey.Number1, &quot;1&quot;, &quot;!&quot;),\r\n        new KC( VirtualKey.Number2, &quot;2&quot;, &quot;&quot;&quot;),\r\n        new KC( VirtualKey.Number3, &quot;3&quot;, &quot;#&quot;),\r\n        new KC( VirtualKey.Number4, &quot;4&quot;, &quot;$&quot;),\r\n        new KC( VirtualKey.Number5, &quot;5&quot;, &quot;%&quot;),\r\n        new KC( VirtualKey.Number6, &quot;6&quot;, &quot;&&quot;),\r\n        new KC( VirtualKey.Number7, &quot;7&quot;, &quot;'&quot;),\r\n        new KC( VirtualKey.Number8, &quot;8&quot;, &quot;(&quot;),\r\n        new KC( VirtualKey.Number9, &quot;9&quot;, &quot;)&quot;),\r\n        new KC( VirtualKey.Number0, &quot;0&quot;, &quot;&quot;),\r\n        new KC((VirtualKey)189 , &quot;-&quot;, &quot;=&quot;),\r\n        new KC((VirtualKey)222, &quot;^&quot;, &quot;~&quot;),\r\n        new KC((VirtualKey)220, &quot;&quot;, &quot;|&quot;),\r\n\r\n...\u7565\r\n\r\n        \/\/ \u7279\u6b8a\u30ad\u30fc\r\n        new KC( VirtualKey.Space, &quot; &quot;, &quot; &quot;),\r\n        new KC( VirtualKey.Enter, &quot;ENTER&quot;, &quot;ENTER&quot;),\r\n        new KC( VirtualKey.Back, &quot;BS&quot;, &quot;BS&quot;),\r\n        new KC( VirtualKey.Insert, &quot;INS&quot;, &quot;INS&quot;),\r\n        new KC( VirtualKey.Delete, &quot;DEL&quot;, &quot;DEL&quot;),\r\n        new KC( VirtualKey.Home, &quot;HOME&quot;, &quot;HOME&quot;),\r\n        new KC( VirtualKey.End, &quot;END&quot;, &quot;END&quot;),\r\n        new KC( VirtualKey.PageUp, &quot;PAGEUP&quot;, &quot;PAGEUP&quot;),\r\n        new KC( VirtualKey.PageDown, &quot;PAGEDOWN&quot;, &quot;PAGEDOWN&quot;),\r\n        new KC( VirtualKey.Up, &quot;UP&quot;, &quot;UP&quot;),\r\n        new KC( VirtualKey.Down, &quot;DOWN&quot;, &quot;DOWN&quot;),\r\n        new KC( VirtualKey.Left, &quot;LEFT&quot;, &quot;LEFT&quot;),\r\n        new KC( VirtualKey.Right, &quot;RIGHT&quot;, &quot;RIGHT&quot;),\r\n\r\n        \/\/ \u6570\u5b57\u30ad\u30fc\u30d1\u30c3\u30c9\r\n        new KC( VirtualKey.NumberKeyLock, &quot;NUMLOCK&quot;, &quot;NUMLOCK&quot;),\r\n        new KC( VirtualKey.Divide, &quot;\/&quot;, &quot;\/&quot;),\r\n        new KC( VirtualKey.Multiply, &quot;*&quot;, &quot;*&quot;),\r\n        new KC( VirtualKey.Subtract, &quot;-&quot;, &quot;-&quot;),\r\n        new KC( VirtualKey.Add, &quot;+&quot;, &quot;+&quot;),\r\n        new KC( VirtualKey.NumberPad0, &quot;0&quot;, &quot;0&quot;),\r\n        new KC( VirtualKey.NumberPad1, &quot;1&quot;, &quot;1&quot;),\r\n        new KC( VirtualKey.NumberPad2, &quot;2&quot;, &quot;2&quot;),\r\n        new KC( VirtualKey.NumberPad3, &quot;3&quot;, &quot;3&quot;),\r\n        new KC( VirtualKey.NumberPad4, &quot;4&quot;, &quot;4&quot;),\r\n        new KC( VirtualKey.NumberPad5, &quot;5&quot;, &quot;5&quot;),\r\n        new KC( VirtualKey.NumberPad6, &quot;6&quot;, &quot;6&quot;),\r\n        new KC( VirtualKey.NumberPad7, &quot;7&quot;, &quot;7&quot;),\r\n        new KC( VirtualKey.NumberPad8, &quot;8&quot;, &quot;8&quot;),\r\n        new KC( VirtualKey.NumberPad8, &quot;9&quot;, &quot;9&quot;),\r\n    };\r\n}\r\n<\/pre>\n<p>\u3053\u3093\u306a\u98a8\u306b\u3061\u307e\u3061\u307e\u3068\u30c6\u30fc\u30d6\u30eb\u3092\u4f7f\u3063\u3066\u5909\u63db\u8868\u3092\u4f5c\u3063\u3066\u304a\u3044\u3066\u3001LINQ \u4f7f\u3063\u3066\u691c\u7d22\u3057\u307e\u3059\u3002<br \/>\nKeyDown\/KeyUp \u6642\u306b\u3042\u308c\u3053\u308c\u3068\u3084\u3063\u3066\u3044\u308b\u306e\u306f\u3001\u8981\u3089\u306a\u3044\u30ad\u30fc\u51e6\u7406\u3092\u6368\u3066\u3066\u3044\u308b\u3068\u3053\u308d\u3067\u3059\u3002\u5b9f\u969b\u8a66\u3057\u3066\u307f\u308b\u3068\u3001\u30ad\u30fc\u30ea\u30d4\u30fc\u30c8\u304c\u5fc5\u8981\u305d\u3046\u306a\u306e\u3067\u3001\u5f8c\u3067\u4fee\u6b63\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nprotected override void OnKeyDown(KeyRoutedEventArgs e)\r\n{\r\n    \/\/ base.OnKeyDown(e);\r\n    OnKey(e);\r\n}\r\nprotected override void OnKeyUp(KeyRoutedEventArgs e)\r\n{\r\n    \/\/ base.OnKeyUp(e);\r\n    OnKey(e);\r\n}\r\nprivate void OnKey(KeyRoutedEventArgs e)\r\n{\r\n    \/\/ if (e.KeyStatus.WasKeyDown == true) return;\r\n\r\n    if (e.Key == Windows.System.VirtualKey.Shift)\r\n    {\r\n        isShift = !e.KeyStatus.IsKeyReleased;\r\n        return;\r\n    }\r\n    if (e.Key == Windows.System.VirtualKey.Menu)\r\n    {\r\n        isAlt = !e.KeyStatus.IsKeyReleased;\r\n        return;\r\n    }\r\n    if (e.Key == Windows.System.VirtualKey.Control)\r\n    {\r\n        isCtrl = !e.KeyStatus.IsKeyReleased;\r\n        return;\r\n    }\r\n    if (e.KeyStatus.WasKeyDown == true) return;\r\n    if (e.KeyStatus.ScanCode == 0) return;  \/\/ Enter\u5916\u3057\r\n\r\n    Debug.WriteLine(&amp;quot;key {0} {1} {2} {3} {4}&amp;quot;,\r\n        e.Key,\r\n        isShift, isCtrl, isAlt,\r\n        e.KeyStatus.ScanCode\r\n        );\r\n\r\n    try\r\n    {\r\n        var key = KCs.First(kc =&gt; kc.Key == e.Key);\r\n        if (OnKeyPush != null)\r\n        {\r\n            string ch = &amp;quot;&amp;quot;;\r\n            if ( key.Normal.Length == 1 ) {\r\n                ch = isShift == false ? key.Normal : key.Shift;\r\n            } else {\r\n                ch = key.Normal;\r\n            }\r\n            OnKeyPush(ch, isShift, isCtrl, isAlt);\r\n        }\r\n    }\r\n    catch (Exception ex)\r\n    {\r\n        Debug.WriteLine(&amp;quot;Error: keycode error {0} {1}&amp;quot;, e.Key, ex.Message );\r\n    }\r\n}\r\n<\/pre>\n<h2>\u25a0\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<\/h2>\n<p><a href=\"http:\/\/github.com\/moonmile\/ChuLang\/tree\/master\/ChuPad\">http:\/\/github.com\/moonmile\/ChuLang\/tree\/master\/ChuPad<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Surface \u306e\u5834\u5408\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u304c\u51fa\u308b\u306e\u3067\u307d\u3061\u307d\u3061\u3068\u6253\u3066\u3070\u3044\u3044\u306e\u3067\u3059\u304c\u3001PC \u74b0\u5883\u3067\u30b9\u30c8\u30a2\u30d7\u30ea\u3092\u4f7f\u3046\u6642\u306b\u306f\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u4f7f\u3063\u305f\u307b\u3046\u304c\u4fbf\u5229\u3067\u3059\u3002 \u304c\u3001XAML \u3067\u306f\u30ad\u30fc\u81ea\u4f53\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u62fe\u3046\u306e\u306f\u30d5\u30a9\u30fc\u30ab\u30b9\u306e\u3042\u308b\u30b3 &hellip; <a href=\"https:\/\/www.moonmile.net\/blog\/archives\/6190\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[23,52],"tags":[],"class_list":["post-6190","post","type-post","status-publish","format-standard","hentry","category-csharp","category-winrt"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/6190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/comments?post=6190"}],"version-history":[{"count":2,"href":"https:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/6190\/revisions"}],"predecessor-version":[{"id":6192,"href":"https:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/6190\/revisions\/6192"}],"wp:attachment":[{"href":"https:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/media?parent=6190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/categories?post=6190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/tags?post=6190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}