Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
KeyRemac4MacBook.rb
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
kei-q
February 17, 2016
Programming
160
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
KeyRemac4MacBook.rb
tokyurubykaigi06発表資料
kei-q
February 17, 2016
More Decks by kei-q
See All by kei-q
春の鎌倉 Tech&Product Meet発表資料
keqh
0
53
Rubyistのみんなに 私の推しのDuckDBを 紹介させてください
keqh
0
99
Repro_Tech_Meetup__1_Docker.pdf
keqh
4
740
PSD.rbでiPhoneアプリ開発のギョームをカイゼンしたい(仮)
keqh
0
210
すごいErlang楽しく学んだ!
keqh
0
230
Other Decks in Programming
See All in Programming
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
1
340
Next.js: The final boss of Web Performance
guaca
0
390
はじめてのPLATEAU
nokonoko1203
1
630
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
170
LLM 101
dalinaum
0
480
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
320
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
250
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
110
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
1.7k
Kawaiicon: Kubernetes, it's no longer cool, but let's secure it anyway!
barnbarn
0
130
Seven New Principles of Software Engineering
yegor256
0
470
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
200
Featured
See All Featured
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.3k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Typedesign – Prime Four
hannesfritz
42
3.2k
A Modern Web Designer's Workflow
chriscoyier
699
190k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
980
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.9k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.2k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
560
Transcript
KeyRemap4MacB ook.rb @kei_q 2013-06-29 TokyuRuby 会議06 #tqrk06
KR4MB とは? https://pqrs.org/macosx/keyremap4macbook/
None
うっかりでアプリ終了しちゃった Cmd + q を長押しに
US 配列でも簡単に入力切り替えし たい Cmd を英数/ かな兼用に
あのアプリでEmacs ぽくカー ソル 移動したい (cmd | opt | ctrl) +
npbf でカー ソル移動
Problem 設定がたいへん
None
設定画面
検索で絞り込み
設定数 1877
設定(XML) <?xml version="1.0" encoding="UTF-8"?> <root> <item> <name>sample</name> <identifier>private.sample</identifier> <autogen>__KeyToKey__ KeyCode::SEMICOLON,
KeyCode::RETURN</autogen> </item> </root>
"XML の視覚的なノイズは、 我慢の限界を超えてい ました。 人々 は, 山括弧が目に痛いと訴え始めたの です。" そこで、XML の問題点なしに、XML
の設定ファイル のメリットを享受したいという願望が出てきまし た。 ドメイン特化言語 - パター ンで学ぶDSL のベストプラクティス46 項目 IX ペー ジより
どうする
None
None
DSL を書こう!
Keyremac gem install keyremac
None
再掲: 設定(XML) <?xml version="1.0" encoding="UTF-8"?> <root> <item> <name>sample</name> <identifier>private.sample</identifier> <autogen>__KeyToKey__
KeyCode::SEMICOLON, KeyCode::RETURN</autogen> </item> </root>
Keyremac では require 'keyremac' ';' .to 'RETURN' 設定の確認 ruby private.rb
--dump 設定の読み込み ruby private.rb --reload
基本機能 キー を別のキー に ';' .to :RETURN キー に修飾キー の機能追加
:JIS_EISUU .overlaid :COMMAND_L 特定のアプリだけ設定を有効に app "APPNAME" do ... end 特定の入力ソー スだけ設定を有効に item inputsource: "APPNAME" do ... end
未対応のタグ タグ名 + '_' でそのまま出力 before item_ do name_ 'jis_to_us'
identifier_ 'private.jis_to_us' autogen_ "__SetKeyboardType__ KeyboardType::MACBOOK" :JIS_YEN .to :BACKQUOTE :JIS_UNDERSCORE .to :BACKQUOTE end
私の設定 JIS をUS に item_ do name_ 'jis_to_us' identifier_ 'private.jis_to_us'
autogen_ "__SetKeyboardType__ KeyboardType::MACBOOK" :JIS_YEN .to :BACKQUOTE :JIS_UNDERSCORE .to :BACKQUOTE end
None
semicolon とunderscore をswap ':' .to ':' ';' .to '_' '_'
.to ';'
F7-9 でitunes 操作 :F7 .to :MUSIC_PREV :F8 .to :MUSIC_PLAY :F9
.to :MUSIC_NEXT
F10-12 で音量調節 :F10 .to :VOLUME_MUTE :F11 .to :VOLUME_DOWN :F12 .to
:VOLUME_UP
SPACE の左右を再設定 :JIS_EISUU .overlaid :COMMAND_L :COMMAND_L .to :OPTION_L :JIS_KANA .to
:RETURN
'A' のとなりを単体で 英数 + ESC :CONTROL_L .overlaid :CONTROL_L, keys: [:JIS_EISUU,
:ESCAPE]
SandS :SPACE .overlaid :SHIFT_L, repeat: true
window 最小化を無効に :m.cmd .to :VK_NONE # disable_minimize
IME 切り替え :j.ctrl .to :JIS_KANA # "Google IME"
左SHIFT を修飾キー に # extra1 :SHIFT_L.cmd .to :SHIFT_L.cmd :SHIFT_L.opt .to
:SHIFT_L.opt :SHIFT_L.ctrl .to :SHIFT_L.ctrl :CONTROL_L.extra1 .to :CONTROL_L.shift :SHIFT_L .to :VK_MODIFIER_EXTRA1
ctrl+npfb をemacs っぽく # ctrl-npを強制的に↑↓に :p.ctrl.none .to :CURSOR_UP :n.ctrl.none .to
:CURSOR_DOWN :b.ctrl.none .to :CURSOR_LEFT :f.ctrl.none .to :CURSOR_RIGHT
TMUX を1 ストロー クで操作 app 'TERMINAL' do "pnco".chars { |c|
c.extra1 .to :JIS_EISUU, :t.ctrl, c } "jkl" .chars { |c| c.extra1 .to :JIS_EISUU, :t.ctrl, c } "du" .chars { |c| c.extra1 .to :t.ctrl, '['.ctrl, c.ctrl } end
Sublime Text でGoogle IME の予 測変換 appdef_ do appname_ "SUBLIME"
equal_ "com.sublimetext.3" equal_ "com.sublimetext.2" end app 'SUBLIME', inputsource: 'JAPANESE' do :TAB .to :i.ctrl end
タブの切替 ['SUBLIME', 'GOOGLE_CHROME'].each { |app_name| app app_name do :p.extra1 .to
:JIS_EISUU, '['.cmd.shift :n.extra1 .to :JIS_EISUU, ']'.cmd.shift end }
Haskell 版Keyremac 製作中
None
getting started $ gem install keyremac $ touch > private.rb
require 'keyremac' ';' .to :RETURN $ ruby private.rb --reload