{"id":12785,"date":"2013-09-30T17:24:06","date_gmt":"2013-09-30T08:24:06","guid":{"rendered":"http:\/\/www.softantenna.com\/wp\/?p=12785"},"modified":"2013-09-30T17:26:33","modified_gmt":"2013-09-30T08:26:33","slug":"keypress","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/keypress\/","title":{"rendered":"JavaScript\u88fd\u306e\u5f37\u529b\u306a\u30ad\u30fc\u30dc\u30fc\u30c9\u5165\u529b\u30ad\u30e3\u30d7\u30c1\u30e3\u30e9\u30a4\u30d6\u30e9\u30ea\u300cKeypress\u300d"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2013\/09\/blogKeypress.png\" alt=\"Keypress\" title=\"Keypress.png\" border=\"0\" width=\"560\" height=\"206\" \/><\/p>\n<p>\u300c<a href=\"http:\/\/dmauro.github.io\/Keypress\/\">Keypress<\/a>\u300d\u306fJavaScript\u88fd\u306e\u30ad\u30fc\u30dc\u30fc\u30c9\u30ad\u30e3\u30d7\u30c1\u30e3\u30e9\u30a4\u30d6\u30e9\u30ea\u3002\u3053\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3059\u308c\u3070\u3001\u30d6\u30e9\u30a6\u30b6\u4e0a\u306e\u30ad\u30fc\u5165\u529b\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u3057\u3066\u3001\u30ad\u30fc\u304c\u62bc\u3055\u308c\u305f\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u69d8\u3005\u306a\u51e6\u7406\u3092\u884c\u3046\u3053\u3068\u304c\u7c21\u5358\u306b\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u5358\u306b\u4e00\u3064\u306e\u30ad\u30fc\u304c\u62bc\u3055\u308c\u305f\u6642\u306b\u51e6\u7406\u3092\u547c\u3073\u51fa\u3059\u3060\u3051\u3067\u306f\u306a\u304f\u3001\u8907\u6570\u306e\u30ad\u30fc\u5165\u529b\u3092\u307e\u3068\u3081\u3066\u6271\u3046\u305f\u3081\u306e\u6a5f\u80fd\u304c\u5145\u5b9f\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u7279\u5fb4\u3067\u3059\u3002<br \/>\n<!--more--><\/p>\n<h3>Counting Combos<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2013\/09\/blogCountingCombos.png\" alt=\"CountingCombos\" title=\"CountingCombos.png\" border=\"0\" width=\"498\" height=\"196\" \/><br \/>\n\u300c<strong>Counting Combos<\/strong>\u300d\u306f\u30ad\u30fc\u3092\u62bc\u3055\u308c\u3066\u3044\u305f\u56de\u6570\u3092\u899a\u3048\u3066\u304a\u304d\u3001\u62bc\u3055\u308c\u305f\u56de\u6570\u3067\u51e6\u7406\u3092\u5909\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u6a5f\u80fd\u3002\u30b5\u30a4\u30c8\u4e0a\u306e\u30c7\u30e2\u3067\u306f\u3001tab\u30ad\u30fc1\u56de\u3067\u3069\u3053\u304b\u3089\u3067\u3082\u300cHome\u300d\u30bf\u30d6\u306b\u623b\u308a\u3001tab+\u30b9\u30da\u30fc\u30b9\u30ad\u30fc\u3067\u9078\u629e\u30bf\u30d6\u304c\u53f3\u306b\u79fb\u52d5\u3057\u3066\u3044\u304f\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>Sequence Combos<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2013\/09\/blogSequenceCombo.png\" alt=\"SequenceCombo\" title=\"SequenceCombo.png\" border=\"0\" width=\"463\" height=\"134\" \/><\/p>\n<p>\u300c<strong>Sequence Combos<\/strong>\u300d\u306f\u30ad\u30fc\u5165\u529b\u306e\u30b7\u30fc\u30b1\u30f3\u30b9(\u9806\u5e8f)\u3092\u6307\u5b9a\u3057\u3066\u304a\u304d\u3001\u9806\u5e8f\u901a\u308a\u306b\u30ad\u30fc\u5165\u529b\u3055\u308c\u305f\u3068\u304d\u306b\u51e6\u7406\u3092\u884c\u3046\u6a5f\u80fd\u3002\u30c7\u30e2\u3067\u306f\u304a\u306a\u3058\u307f\u306e\u6ce2\u52d5\u62f3\u3092\u300c\u2193 \u2192 x\u300d\u3067\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u547c\u3073\u51fa\u3057\u65b9\u3082\u7c21\u5358<\/h3>\n<pre><code class=\"javascript\">keypress.combo(\"shift s\", function() {\n    console.log(\"You pressed shift and s\");\n});\n\n\/\/ There are also a few other shortcut methods:\n\n\/\/ If we want to register a counting combo\nkeypress.counting_combo(\"tab space\", function(e, count) {\n    console.log(\"You've pressed this \" + count + \" times.\");\n});\n\n\/\/ If you want to register a sequence combo\nkeypress.sequence_combo(\"up up down down left right left right b a enter\", function() {\n    lives = 30;\n}, true);\n\n<\/code><\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u4f7f\u7528\u65b9\u6cd5\u3082\u76f4\u611f\u7684\u306b\u7406\u89e3\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Keypress\u306b\u8907\u96d1\u306a\u30ad\u30fc\u30dc\u30fc\u30c9\u5165\u529b\u51e6\u7406\u3092\u307e\u304b\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u308c\u3070\u76f8\u5f53\u697d\u306b\u306a\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002\u899a\u3048\u3066\u304a\u3044\u3066\u640d\u306f\u306a\u3044\u3068\u601d\u308f\u308c\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u300cKeypress\u300d\u306fJavaScript\u88fd\u306e\u30ad\u30fc\u30dc\u30fc\u30c9\u30ad\u30e3\u30d7\u30c1\u30e3\u30e9\u30a4\u30d6\u30e9\u30ea\u3002\u3053\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3059\u308c\u3070\u3001\u30d6\u30e9\u30a6\u30b6\u4e0a\u306e\u30ad\u30fc\u5165\u529b\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u3057\u3066\u3001\u30ad\u30fc\u304c\u62bc\u3055\u308c\u305f\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u69d8\u3005\u306a\u51e6\u7406\u3092\u884c\u3046\u3053\u3068\u304c\u7c21\u5358\u306b\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":12782,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[75],"tags":[655,1561],"class_list":["post-12785","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-javascript","tag-keypress"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/12785","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=12785"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/12785\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/12782"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=12785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=12785"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=12785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}