diff options
-rwxr-xr-x | feedSomeKeys_3.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/feedSomeKeys_3.js b/feedSomeKeys_3.js index 746960e..8012a56 100755 --- a/feedSomeKeys_3.js +++ b/feedSomeKeys_3.js @@ -39,7 +39,7 @@ let PLUGIN_INFO = <name lang="ja">feedSomeKeys 3</name> <description>feed some defined key events into the Web content</description> <description lang="ja">キーイベントをWebコンテンツ側に送る</description> - <version>1.0.2</version> + <version>1.0.3</version> <author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author> <license>new BSD License (Please read the source code comments of this plugin)</license> <license lang="ja">修正BSDライセンス (ソースコードのコメントを参照してください)</license> @@ -56,7 +56,7 @@ let PLUGIN_INFO = // }}} // INFO {{{ let INFO = -<plugin name="feedSomeKeys" version="1.0.2" +<plugin name="feedSomeKeys" version="1.0.3" href="http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/feedSomeKeys_3.js" summary="Feed some defined key events into the Web content" xmlns="http://vimperator.org/namespaces/liberator"> @@ -175,7 +175,10 @@ let INFO = } function virtualize (event) { - event.keyCode = VKeys[String.fromCharCode(event.charCode).toLowerCase()]; + let cc = event.charCode; + if (/^[A-Z]$/.test(String.fromCharCode(cc))) + event.shiftKey = true; + event.keyCode = VKeys[String.fromCharCode(cc).toLowerCase()]; event.charCode = 0; return event; } |