aboutsummaryrefslogtreecommitdiffstats
path: root/feedSomeKeys_3.js
diff options
context:
space:
mode:
authoranekos2010-03-01 18:59:33 +0000
committeranekos2010-03-01 18:59:33 +0000
commitdd75027e825c3adfeb51b29cea412eb849fb82ca (patch)
tree6f8cfbff1fd5eca3f22ae070ef05e0098c546210 /feedSomeKeys_3.js
parentecea02e73d3a78652120edc5492a1c2a93d58ba6 (diff)
downloadvimperator-plugins-dd75027e825c3adfeb51b29cea412eb849fb82ca.tar.bz2
vkey 時の大文字指定(shiftKey)が正しくされていないのを修正
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@36896 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'feedSomeKeys_3.js')
-rwxr-xr-xfeedSomeKeys_3.js9
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;
}