禁断の快楽・変態キーバインドのお誘い このエントリをはてなブックマークに>追加

増井俊之氏がセミコロンにエンターをバインドしているという話が頭から離れなかった。もういっそのこと彼以上の変態キーバインドにしてしまおう。コンセプトはホームポジションから一切手を離さずに日常の動作を行うこと。使用ソフトはVista以外のWindows用窓使いの憂鬱(以下mayu)だ(Windows Server 2003 Resource Kit Toolsこのようなソフトウェアもあるらしい。thanks>infohack氏)。

まず感想。いざ慣れると、いかにいままで遠いキーに振り回されていたかが痛感できた。ホームポジション近辺だけで文章やコードが打てるのがこんなに快適だとは正直思わなかった。真似したい人は少ないかも知れないが、大げさではなく、本当に流れるように文章やコードが打てる。

エンター

まず、増井俊之氏の言うとおり思い切ってセミコロンキーをエンターにしてみた。するとこれが想像を絶する快適さ。エンターって打つ時「バン!」って感じで小指を飛ばしちゃいますが、これは本当に舐めるようにタイプできる。すばらしいの一言。病み付きになりますよ。あらためて増井俊之氏は凄い人だ。

CapsLockとControl

以下、Controlを駆使するので、不幸にもAの横にCapsLockがある人のためにCapsLockとControlを入れ替える設定も書いておいた。そうでない人はそのままで大丈夫。

セミコロン

しかしエンターキーをセミコロンにするのには抵抗があった。マウス操作から帰ってくるとセミコロンキー(エンター)は打ちにくい。それにセミコロンを打つたびにエンターキーまで小指が遠征するのはコンセプトに反している。そこでエンターキーはそのまま生かすことにした。そしてCtrl+;でセミコロンを打つようにした。同じキーなので直感的でもある。ホームポジションも崩れない。Shift+EnterやCtrl+Enterが使えない難点があるが、そういうときだけ元々のエンターキーを使えばよい。

バックスペース

次にバックスペース。遠いキーだ。これにはCtrl+hを使うようにした。バックスペースは連打することが多いのだが小指は連打に向かない。人差し指が使えるメリットは大きい。Ctrl+hには元々BSが割り当てられているのだし、viの戻るもhキーなのですぐ慣れた(*1)。なおBSキーも片手で打てる利点があるのでこれもそのまま残すことに。

なお、WindowsでもCtrl+hは元々バックスペースとして働くのだが、ショートカットが割り当てられているとそちらが優先されてしまうので(例:Firefox)改めてバインドしなおした方が良い。

エスケープ

次。エスケープキー。vi使いはエスケープキーの遠さは致命的だ。これもCtrl+hと同じ理由でCtrl+[にした。この2つはUNIXで操作する時に全く問題がでないというメリットもある。エスケープキーもマウス操作中にダイアログをキャンセルしたい時などに便利なのでそのまま生かすことに。

IME

そしてWindowsで一番ホームポジションが崩れるのがIMEのスイッチだ。この配置は嫌がらせとしか思えない。そこでAlt+スペースでIME/ON、Shift+スペースでIME/OFFになるようにした(Macintoshを意識した)(*3)。これがまたすばらしすぎる。今までAlt+~(JIS配列の人はAlt+漢字)の奴隷になっていたのが良く分かる。ONとOFFのキーを分けることで、現在のIMEの状態を気にすることもない。これで日本語のタイプ速度がぐっと上昇した。

なお日本語配列では変換キー、無変換キーをIMEのOn/Offにバインドしている人が多いようだ。日本語キーボードの変換・無変換キーは親指で押せる位置にあるので良いかも知れない。

矢印

最後は矢印だ。vi風のhjklを色々考えてみたのだが、ダメだった。しかし、よく考えてみるとtcshなどでemacsの上下左右には慣れ親しんでいることに気がついたのでemacs風バインドを追加してみた。ただし、検索のCtrl+Fとかぶるなど問題点も多く、結局あきらめた。

改めて感想

しかしホームポジションから手を離さずにプログラミングや日本語入力をするのがこんなに快適だとは思ってみなかった。頻繁に小指を伸ばしたり、ホームポジションから指を外したりするのは、想像以上にストレスになっていたようだ。

私の方法はエンターもBSもEscもそのままなので、なかなか矯正できない人はこれらのキーを一時的に殺すとすぐ慣れるようになる(*2)。これらのキーを殺す設定も併記しておく(*4)。

設定方法

以下設定。mayuをインストールして、C:\Documents and Settings\yourname\.mayuファイルに書く。注意。1行目は使っているキーボードで変えるように!これはUS配列(@マークが左上にある)用の設定である。JIS配列(@マークが右側にある)の人はinclude "109.mayu"としよう。

include "104.mayu" # 104 キーボード設定
# include "109.mayu" # JIS配列の場合はこちら

# CapsLockをControlに
mod control += CapsLock
key *CapsLock	= *LControl
# 109な方はこちら
#mod control += 英数
#key *英数	= *LControl

# セミコロンをエンターに
key *IC-SemiColon = Enter

# Ctrlを押しながらだとセミコロンに
key *IC-C-~S-SemiColon = SemiColon

# Ctrl+hをバックスペースに
key *IC-C-H    = BS

# Ctrl+[をエスケープに(vi仕様)
key C-OpenBracket    = ESC & Sync & SetImeStatus(off)
key IC-C-OpenBracket = ESC ESC & Sync & SetImeStatus(off)

# vi使わない人はこちらの1行でよい(直上の2つの設定はいらない)
# key *IC-C-OpenBracket = ESC

# Alt+スペース、Shift+スペースでIMEのON/OFF
key *IC-M-Space = &Sync &SetImeStatus(on)
key *IC-S-Space = &Sync &SetImeStatus(off)

# 日本語キーボードの方はこちらの方が便利かも知れない
# key *IC-変換   = &Sync &SetImeStatus(on)
# key *IC-無変換 = &Sync &SetImeStatus(off)

# emacs風矢印
key C-B   = Left    # ←
key C-P   = Up      # ↑
key C-N   = Down    # ↓
key C-F   = Right   # →

key S-C-B = S-Left  # ←(選択)
key S-C-F = S-Right # →(選択)
key S-C-N = S-Down  # ↓(選択)
key S-C-P = S-Up    # ↑(選択)

# 矯正用(*4)(既存キーを殺します。コメント(#)を外すと有効に)
# key BS    = &Undefined
# key Enter = &Undefined
# key ESC   = &Undefined

注釈

  • (*1)そもそもviの「戻る」がhなのは、Ctrl+hがBSであることに由来するらしい(Bill Joy氏使用のターミナルが由来だということです。えりむさんありがとうございます)
  • (*2)ただしIMEは殺さない方がいい。なぜか、まれにIMEのON/OFFが効かなくなることがあるからだ。こういう時はデフォルトのIME切り替えで日本語打ったり英字を打ったりするとすぐ治る。
  • (*3)なお、これは当方がUS配列だからであって、JIS配列の方は「変換」「無変換」キーにそれぞれIMEのON/OFFを割り当てている方が多いようだ。
  • (*4)万一書き間違えなどでエンターが打てない!などとなってもパニックにならずに、ツールバー右下のアイコンを右クリックして「一時停止」を選べば大丈夫。設定を見直して「再読み込み」させればよい。

訂正

初校でまつもとゆきひろ氏と書いてしまったが、指摘があったので読み直してみたら増井俊之氏の間違いだったので訂正した。両氏にはご迷惑をおかけしたことをお詫びすると同時に、間違いをご指摘くださった方に感謝。

43 件のコメント - “禁断の快楽・変態キーバインドのお誘い”

  1. Cream Cheese Chicken Recipes のコメント

    Related……

    [… ]just beneath, are numerous totally possibly not related sites to our bait, however, they are absolutely worth going over[… ]……

  2. Solar Panels のコメント

    Informative and precise

    Its hard to find informative and precise information but here I found

  3. gift baskets toronto のコメント

    Check this out

    […] that is the end of this article. Here you’ll find some sites that we think you’ll appreciate, just click the links over[…]…

  4. bonsai trees のコメント

    Check this out

    […] that is the end of this article. Here you’ll find some sites that we think you’ll appreciate, just click the links over[…]…

  5. addicting games.com のコメント

    Check this out

    […] that is the end of this article. Here you’ll find some sites that we think you’ll appreciate, just click the links over[…]…

  6. Shrimp And Chicken Meat Pie のコメント

    The best website……

    […]here are some links to sites that we link to because we think they are worth visiting[…]……

  7. trampoline avec filet のコメント

    Yahoo News

    When checking out Yahoo News today I found this

  8. presentacion telematica cuentas anuales のコメント

    Sites we Like…

    […] Every once in a while we choose blogs that we read. Listed below are the latest sites that we choose […]…

  9. hawke scopes のコメント

    Read was interesting, stay in touch…

    […]please visit the sites we follow, including this one, as it represents our picks from the web[…]…

  10. access course のコメント

    Read was interesting, stay in touch…

    […]please visit the sites we follow, including this one, as it represents our picks from the web[…]…

  11. anniversary love coupons のコメント

    Skills For Life

    […]Thank you for posting this exciting facts. I’ll check your internet site inside the future.[…]

  12. http://www.piscineautoportante.net/ のコメント

    Bing results

    While searching Bing I found this page in the search results and I didn’t think it match

  13. online dating tips のコメント

    abeles

    Hey There. I found your blog using msn. This is a very good written article. I’ll be sure to bookmark it and return to read more of your useful info. Thanks for the post. I’ll definitely comeback.

  14. iphone 4 white conversion kit のコメント

    Website Trackback Link

    […]the time to read or visit the content or sites we have linked to below the[…]

  15. bug detector のコメント

    Websites You Should Visit

    […]very few websites that happen to be detailed below, from our point of view are undoubtedly well worth checking out[…]

  16. Sophia Allison のコメント

    Read was interesting, stay in touch…

    […]please visit the sites we follow, including this one, as it represents our picks from the web[…]…

  17. Create Multiuser Blog のコメント

    Websites you should visit

    […]below you’ll find the link to some sites that we think you should visit[…]…

  18. Glasgow personal trainer のコメント

    Yahoo results

    While searching Yahoo I found this page in the results and I thought it looked interesting

  19. Horoskopishqip のコメント

    Visitor recommendations

    […]one of our visitors recently recommended the following website[…]…

  20. kinky sex のコメント

    dateing

    Hi! I just wanted to ask if you ever have any issues with hackers? My last blog (wordpress) was hacked and I ended up losing a few months of hard work due to no backup. Do you have any methods to prevent hackers?

  21. Faster Computer のコメント

    Interesting….

    A very neat post.

  22. French Fried Onion Chicken のコメント

    Cool sites…

    […]we came across a cool site that you might enjoy. Take a look if you want[…]……

  23. AMG Services のコメント

    Read was interesting, stay in touch…

    […]please visit the sites we follow, including this one, as it represents our picks from the web[…]…

  24. AMG Services のコメント

    Superb website

    […]always a big fan of linking to bloggers that I love but don’t get a lot of link love from[…]…

  25. mudjacking Kansas City のコメント

    mudjacking Kansas City

    […] Every once in a while we choose blogs that we read. Listed below are the latest sites that we choose […]?

  26. Click Plane Tickets のコメント

    Interesting….

    A very neat post.

  27. disque dur externe pas cher のコメント

    Just Looking

    When I was surfing today I noticed a excellent post about

  28. Sua banda no site balada365 のコメント

    Interesting….

    A very interesting post.

  29. sorbetiere のコメント

    Tumblr

    Tumblr linked to this site

  30. english to indonesian translation のコメント

    Great website

    […]we like to honor many other internet sites on the web, even if they aren’t linked to us, by linking to them. Under are some webpages worth checking out[…]…

  31. telephone fixe sans fil のコメント

    Bing results

    While searching Bing I found this page in the search results and I didn’t think it match

  32. Secret traffic machines のコメント

    Recommeneded websites

    […]Here are some of the sites we recommend for our visitors[…]…

  33. sacoche homme のコメント

    News

    I was reading the Yahoo news and I saw this really interesting topic

  34. solar panels scotland のコメント

    Digg

    While checking out DIGG today I found this

  35. How to be on Google first page のコメント

    Digg

    While checking out DIGG today I noticed this

  36. Anonymous のコメント

    Recommeneded websites

    […]Here are some of the sites we recommend for our visitors[…]…

  37. vocabulary workshop answers のコメント

    Check this out

    […] that is the end of this article. Here you’ll find some sites that we think you’ll appreciate, just click the links over[…]…

  38. facebookofsex のコメント

    dating site

    Incredible! This blog looks just like my old one! It’s on a entirely different subject but it has pretty much the same layout and design. Wonderful choice of colors!

  39. TV のコメント

    Cool sites

    […]we came across a super site that you might enjoy. Take a look if you want[…]…

  40. white watches for women のコメント

    Bing results

    While searching Bing I discovered this page in the search results and I didn’t think it match

  41. Solicitor Glasgow のコメント

    Dreary Day

    It was a dreary day here today, so I just took to piddeling around on the internet and realized

  42. true nutrition coupon code のコメント

    ……..

    I guess for now i am going to be satisfied with book-marking and including the Feed for you to my personal Yahoo consideration. I look ahead to new changes and can share this kind of website along with my personal Facebook or myspace class.

  43. discount north face jackets のコメント

    By TNF , for example, clothes lanyard for the different clothes and different, but most are nylon, and most of the color gray, red, black, etc., some of the same material or fabric and clothing.Following the issue to a lot of pictures show the different clothes, strap structure, color, form will be very different. North Face design will be different depending on the clothes of the lanyard.

コメントをどうぞ。

使用できる XHTML タグ : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>