diff options
author | teramako | 2009-11-19 13:55:06 +0000 |
---|---|---|
committer | teramako | 2009-11-19 13:55:06 +0000 |
commit | 114da65a5965d623aa12e9cda02ef5cef1e12bac (patch) | |
tree | ed05ba541539ce7daf6d30227f05a66f5ae5f88f /feedSomeKeys_2.js | |
parent | 7a7f936c57198c1328ad39bd422d55abfdbba501 (diff) | |
download | vimperator-plugins-114da65a5965d623aa12e9cda02ef5cef1e12bac.tar.bz2 |
new Help System
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@35949 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'feedSomeKeys_2.js')
-rw-r--r-- | feedSomeKeys_2.js | 148 |
1 files changed, 72 insertions, 76 deletions
diff --git a/feedSomeKeys_2.js b/feedSomeKeys_2.js index c8acd3c..729f65e 100644 --- a/feedSomeKeys_2.js +++ b/feedSomeKeys_2.js @@ -1,86 +1,82 @@ +let INFO = +<plugin name="feedSomeKeys" version="2.2.3" + href="http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/feedSomeKeys_2.js" + summary="Feed some defined key events into the Web content" + xmlns="http://vimperator.org/namespaces/liberator"> + <author email="teramako@gmail.com">teramako</author> + <license href="http://www.mozilla.org/MPL/MPL-1.1.html">MPL 1.1</license> + <project name="Vimperator" minVersion="2.3"/> + <p> + keyイベントをWebコンテンツ側へ送る事を可能にするプラグイン。 + GmailやGreasemonkeyでキーを割り当てている場合に活躍するでしょう。 + </p> + <item> + <tags>:fmap :feedmap</tags> + <spec>:f<oa>eed</oa>map <oa>-depath=<a>frameNumber</a></oa> <oa>-vkey</oa> <oa>-event=<a>eventName</a></oa> <oa>lhs<oa>,<oa>frameNumber</oa>rhs</oa></oa></spec> + <description> + <p> + Feed to the Web contents <oa>lhs</oa>. + If specified <oa>rhs</oa>, feed <oa>rhs</oa> key events when hit <oa>lhs</oa>. + </p> + <p>The following options are interpreted.</p> + <dl> + <dt>-v<oa>key</oa></dt> + <dd>仮想キーコードでイベントを送る</dd> + <dt>-e<oa>vent</oa></dt> + <dd> + 以下の<oa>eventName</oa>が設定可能 + <ul> + <li>keypress (default)</li> + <li>keydown</li> + <li>keyup</li> + </ul> + </dd> + </dl> + </description> + </item> + <item> + <tags>:fmapc :feedmapclear</tags> + <spec>:fmapc</spec> + <spec>:feedmapclear</spec> + <description> + <p>clear fmap entries</p> + </description> + </item> + <h3 tag="combine-fmap-with-autocmd">Combine fmap with autocmd</h3> + <code><ex> +:autocmd LocationChange .* fmapc +:autocmd LocationChange 'example\.com' fmap a b c + </ex></code> + <h3 tag="fmap-examples">fmap examples</h3> + <p> + At first, you need to write following code + <code>:autocmd LocationChange .* :fmapc</code> + </p> + <h4 tag="fmap-example-gmail">Gmail</h4> + <code> +:autocmd LocationChange 'mail\.google\.com/mail' :fmap c / j k n p o u e x s r a # [ ] z ? gi gs gt gd ga gc + </code> + <h4 tag="fmap-example-ldr">Livedoor Reader</h4> + <code> +:autocmd LocationChange 'reader\.livedoor\.com/reader' :fmap j k s a p o v c <Space> <S-Space> z b < > + </code> + <h4 tag="fmap-example-googlereader">Google Reader</h4> + <code> +:autocmd LocationChange 'www\.google\.co\.jp/reader' :fmap! -vkey j k n p m s t v A r S N P X O gh ga gs gt gu u / ? + </code> + <h4 tag="fmap-example-googlecalendar">Google Calendar</h4> + <code> +:autocmd LocationChange 'www\.google\.com/calendar/' :fmap! -vkey -event keydown t a d w m x c e <Del> / + q s ? + </code> +</plugin> var PLUGIN_INFO= <VimperatorPlugin> <name>{NAME}</name> <description>feed some defined key events into the Web content</description> -<description lang="ja">定義したkeyイベントをWebページへ送ってあげる</description> <version>2.2.3</version> <author mail="teramako@gmail.com" homepage="http://vimperator.g.hatena.ne.jp/teramako/">teramako</author> -<minVersion>2.0pre</minVersion> -<maxVersion>2.2</maxVersion> +<minVersion>2.3</minVersion> <updateURL>http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/feedSomeKeys_2.js</updateURL> -<detail lang="ja"><![CDATA[ -== 概要 == -keyイベント(正確にはkepressイベント)をWebコンテンツ側へ送る事を可能にするプラグイン -Gmailとかlivedoor ReaderとかGreasemonkeyでキーを割り当てている場合に活躍するでしょう。 -それ以外の場面ではむしろ邪魔になる諸刃の剣 - -== Commands == -:f[eed]map lhs [...]: - lhsのキーマップをそのままWebコンテンツへ - -:f[eed]map lhs,[num]rhs [...]: - lhsのキーマップをrhsへ変換してWebコンテンツへ - [num]はフレームの番号(省略時はトップウィンドウへイベントが送られる) - -:f[eed]map -d[epth] {num} ...: - {num}はフレームの番号で :fmap lhs1,{num}rhs1 lhs2,{num}rhs2 ... と同等 - -:f[eed]map -v[key] ....: - 仮想キーコードでイベントを送るように - -:f[eed]map -e[vent] {EventName} ...: - イベント名を指定します - - keypress (default) - - keydown - - keyup - -:fmapc: -:feedmapclear: - 全てを無に帰して元に戻す - -:f[eed]map! lhs ...: - "!" をつけると、一旦すべてのfeedKeysを元に戻しての再定義 - -== autocmdと組み合わせる場合 == ->|| -:autocmd LocationChange .* :fmapc -||< -を最初に登録してください。でないと対象外のページに移ったときに設定が前のものを引きずることになります。 - -== 用例 == -最初に登録すべき ->|| -:autocmd LocationChange .* :fmapc -||< -は省略 - -=== LDR の場合 === ->|| -:autocmd LocationChange 'reader\.livedoor\.com/reader' :fmap j k s a p o v c <Space> <S-Space> z b < > -||< - -=== Gmail の場合 === ->|| -:autocmd LocationChange 'mail\.google\.com/mail' :fmap c / j k n p o u e x s r a # [ ] z ? gi gs gt gd ga gc -||< - -=== Google Reader の場合 === ->|| -:autocmd LocationChange 'www\.google\.co\.jp/reader' :fmap! -vkey j k n p m s t v A r S N P X O gh ga gs gt gu u / ? -||< - -=== Google Calendar の場合 === ->|| -:autocmd LocationChange 'www\.google\.com/calendar/' :fmap! -vkey -event keydown t a d w m x c e <Del> / + q s ? -||< - -=== FriendFeed の場合 === ->|| -:autocmd LocationChange 'friendfeed\.com/' :fmap! -vkey -event keydown p P q / gh gd gm gb -||< - -Greasemonkey LDRizeの場合などにも使用可 -]]></detail> </VimperatorPlugin>; liberator.plugins.feedKey = (function(){ |