Upgrade to Pro — share decks privately, control downloads, hide ads and more …

キーバインド設定本立ち読み / Trial of keybind book

akrolayer
December 14, 2019

キーバインド設定本立ち読み / Trial of keybind book

akrolayer

December 14, 2019
Tweet

More Decks by akrolayer

Other Decks in How-to & DIY

Transcript

  1. ͸͡Ίʹ ͜ͷຊΛखʹͱ͍͖ͬͯͨͩ͋Γ͕ͱ͏͍͟͝·͢ɻ ౜ಥͰ͕͢ɺ͋ͳͨ͸ΩʔϘʔυʹରͯ͠ෆຬ͸͋Γ·ͤΜ͔ʁ චऀ͸ɺҎԼͷ Α͏ͳෆຬΛ͍࣋ͬͯ·ͨ͠ɻ • ԡ͠΍͍͢Ґஔʹ͋Δ͕ϩʔϚࣈೖྗ࣌ʹͳ͔ͳ͔࢖Θͳ͍ɿແม׵Ωʔɺม ׵ΩʔɺΧλΧφͻΒ͕ͳΩʔ • খࢦΛ৳͹͞ͳ͍ͱԡͤͳ͍ɿEsc

    ΩʔɺEnter ΩʔɺBackSpace ΩʔɺIME Ωʔ • ϗʔϜϙδγϣϯ͔Βख͕཭ΕΔɿDelete ΩʔɺPageUp ΩʔɺPageDown ΩʔɺΧʔιϧΩʔ ͜ΕΛղܾ͢ΔͨΊʹɺࣗ࡞ΩʔϘʔυʂ ͱݴ͍͍ͨͱ͜ΖͰ͕͢ɺࣗ࡞ΩʔϘʔ υ·ͰखΛग़ͤͳ͍ͱ͍͏ํ΋͍Δͱࢥ͍·͢ɻචऀ΋࠷ॳ͸ͦ͏Ͱͨ͠ɻࣗ࡞Ωʔ Ϙʔυ͸ 3 ສԁલޙ͔͔Γ·͢͠ɺ͸Μͩ෇͚ͷख͕ؒ͋Γ·͢ɻΩʔόΠϯυઃఆ ͸ແྉͰ͢͠ɺख͕ؒগͳ͘గਖ਼͠΍͍͢Ͱ͢ʢڽΔͱ࣌ؒΛແݶʹ࢖͏ʣ ɻ ͦ͜Ͱචऀ͸ɺΩʔόΠϯυઃఆΛ͢ΔιϑτΛಋೖ͠·ͨ͠ɻΩʔόΠϯυͱ ͸ɺϗοτΩʔɺγϣʔτΧοτΩʔͱಉ͡Α͏ͳҙຯͰಛఆͷΩʔͷ૊Έ߹ΘͤͰ ͋ΔॲཧΛ࣮ߦ͢ΔઃఆͰ͢ɻ චऀ͸ԡ͠΍͍͢Ґஔʹ͋Δແม׵Ωʔɺม׵ΩʔɺΧλΧφͻΒ͕ͳΩʔΛτϦ Ψʔʹͯ͠ɺϗʔϜϙδγϣϯ͔Βԡͤͳ͍Ґஔʹ͋ΔΩʔΛೖྗͰ͖Ε͹΄ͱΜͲ ϗʔϜϙδγϣϯ͔ΒखΛಈ͔ͣ͞ʹࡁΉΑ͏ʹͳΔͱߟ࣮͑૷͠·ͨ͠ɻ঺հ͢Δ ιϑτ͸ɺϚ΢εҠಈɺΫϦοΫ΋ઃఆͰ͖·͢ɻΩʔόΠϯυΛઃఆͨ͜͠ͱͰஶ ऀͷෆຬ͸ղফ͞Εɺݱࡏ͸շదΩʔϘʔυੜ׆ΛૹΕ͍ͯ·͢ɻ ͜ͷຊͰ঺հ͢Δͷ͸ AutoHotkey ͱ Karabiner-Elements Ͱ͢ɻWindows Ϣʔβ͸ AutoHotkeyɺMac Ϣʔβ͸ Karabiner-Elements Λ࢖ͬͯԼ͍͞ɻ Karabiner-Elements ͸ macOS Sierra Ҏ߱ʹରԠ͍ͯ͠·͢ɻSierra ະຬͷํ͸ Karabiner Λ࢖͍ͬͯͩ͘͞ɻMacOS Catalina ͸ಈ࡞ͤ͞ΔͨΊʹͻͱखؒ͋Δ ͷͰͦ͜΋঺հ͠·͢ɻ ݱ࣌఺Ͱ΋։ൃ͕ਐΊΒΕ͍ͯΔͨΊɺ2019/12/14 ࣌఺ʹ͓͚Δػೳͷ঺հͱͳ 2
  2. ໨࣍ ͸͡Ίʹ 2 ໔੹ࣄ߲ . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 ୈ 1 ষ AutoHotkey 5 1.1 AutoHotkey ͱ͸ . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2 ࣮ࡍʹΩʔόΠϯυઃఆͯ͠ΈΑ͏ . . . . . . . . . . . . . . . . . 5 1.3 ͏·͍͔͘ͳ͍ΩʔϘʔυ͸ ChangeKey Λ࢖͓͏ . . . . . . . . 8 ScrollLockɺPause/Break . . . . . . . . . . . . . . . . . . . . . 11 1.4 ศརͳΩʔόΠϯυઃఆͷྫ . . . . . . . . . . . . . . . . . . . . 11 1.5 ϗοτετϦϯά . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.6 AHK-Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.7 ऴΘΓʹ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 ୈ 2 ষ Karabiner-Elements 19 2.1 Karabiner-Elements ͱ͸ . . . . . . . . . . . . . . . . . . . . . 19 2.2 MacOS Catalina ͷ৔߹ . . . . . . . . . . . . . . . . . . . . . . 19 2.3 ࣮ࡍʹΩʔόΠϯυઃఆͯ͠ΈΑ͏ . . . . . . . . . . . . . . . . . 20 2.3.1 طଘઃఆͷΠϯϙʔτ . . . . . . . . . . . . . . . . . . . 20 2.3.2 ಠࣗઃఆ . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.4 ऴΘΓʹ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 ͋ͱ͕͖ 40 ஶऀ঺հ 41 4
  3. ୈ 1 ষ AutoHotkey 1.1 AutoHotkey ͱ͸ AutoHotkey ͸ɺγϣʔτΧοτΩʔΛࣗ෼Ͱ࡞੒͢ΔͳͲɺΩʔϘʔυΛΧελ ϚΠζͰ͖Δ

    Windows ରԠͷεΫϦϓτΤϯδϯͰ͢ɻτϦΨʔͱͳΔΩʔͷ૊Έ ߹Θͤ΍୯ଧɺτϦΨʔͨ͠ޙͷॲཧΛ؆୯ͳจ๏ͰઃఆͰ͖·͢ɻΩʔϘʔυͷ ΩʔೖྗΛผͷΩʔʹมߋ͢Δ͚ͩͰͳ͘ɺจࣈྻૢ࡞΍ϑΝΠϧૢ࡞ɺϚ΢εૢ ࡞ɺGUI ϓϩάϥϜͷ࡞੒ɺಛఆ΢Οϯυ΢ͰͷΈಈ࡞ɺλΠϚʔͳͲଟ࠼ͳίϚϯ υ͕༻ҙ͞Ε͍ͯ·͢ɻ ࠓճͷຊͰ͸ɺ؆୯ʹઃఆͰ͖ΔτϦΨʔͷΩʔͷ૊Έ߹ΘͤͰΩʔೖྗɺϚ ΢εૢ࡞ɺผιϑτͷىಈΛߦ͏ํ๏Λ঺հ͠·͢ɻจࣈྻૢ࡞΍ϑΝΠϧૢ ࡞ɺGUI ૢ࡞ͳͲΛ͍ͨ͠ํ͸ӳޠͰ͕͢ AutoHotkey ͷϔϧϓ΍ެࣜνϡʔτ ϦΞϧʢެࣜαΠτͷԼ෦ʹϦϯΫ͋Γʣ ɺ೔ຊޠ͕͍͍ͳΒ AutoHotkey Wiki ʢhttp://ahkwiki.net/TopʣΛࢀর͍ͯͩ͘͠͞ɻͨͩ͠ɺAutoHotkey Wiki ͸ 2014 ೥Ͱߋ৽͕ऴΘ͍ͬͯΔͨΊɺ஫ҙ͕ඞཁͰ͢ɻ 1.2 ࣮ࡍʹΩʔόΠϯυઃఆͯ͠ΈΑ͏ ͜͜Ͱ͸ɺAutoHotkey Λ༻͍ͨઃఆྫΛ͍͖ࣔͯ͠·͢ɻ࠷ऴతʹ͸ɺҎԼΛͰ ͖ΔΑ͏ʹ͍ͯ͠·͢ɻ* ্ԼࠨӈΧʔιϧҠಈ* Delete ΩʔɺEnter ΩʔɺIME ੾Γସ͑ΩʔͷҐஔมߋ* Ϛ΢εҠಈ · ͣ ͸ ͡ Ί ʹ ɺAutoHotkey Λ Π ϯ ε τ ʔ ϧ ͠ · ͠ ΐ ͏ ɻެ ࣜ α Π τ ʢhttps://autohotkey.com/download/ʣͷ Download Autohotkey Installer ΛΫϦοΫͯ͠ΠϯετʔϥΛμ΢ϯϩʔυ͠·͢ɻΠϯετʔϥΛىಈͯ͠ɺಛʹ ͩ͜ΘΓ͕ͳ͚Ε͹ʮExpress InstallationʯΛΫϦοΫ͍ͯͩ͘͠͞ɻ ࣍ʹεΫϦϓτΛॻ͍͍͖ͯ·͢ɻΤσΟλʢϝϞாͰՄʣΛ։͖ɺ࣍ͷ಺༰Λॻ 5
  4. ୈ 2 ষ Karabiner-Elements 2.1 Karabiner-Elements ͱ͸ Karabiner-Elements ͱ͸ɺSierra Ҏ߱ͷ

    macOS ͷΩʔϘʔυΛΧελϚΠζ ͢ΔͨΊͷπʔϧͰ͢ɻSierra ͔ΒΩʔϘʔυυϥΠόͷߏ੒͕มߋ͞ΕͨͨΊɺ Karabiner-Elements ͕։ൃ͞Ε·ͨ͠ʢͦΕΑΓલ͸ Karabiner ͕։ൃ͞Ε͍ͯ ·ͨ͠ʣ ɻ͜ͷຊͰ͸ɺKarabiner-Elements Λѻ͍·͢ɻ طଘͰ༻ҙ͞Ε͍ͯΔઃఆΛΠϯϙʔτ͢Δ͜ͱ͕Ͱ͖ɺͦͷதʹओཁΤσΟλͷ γϣʔτΧοτΩʔʢVim, Emacs, Visual Studio Codeʣ͕͋Γͱͯ΋؆୯ʹઃఆ Ͱ͖·͢ɻΩʔͷ૊Έ߹ΘͤͰଞͷΩʔೖྗ΍ɺϚ΢εૢ࡞ɺΩʔόΠϯυઃఆ͕ಠ ࣗͰఆٛͰ͖·͢ɻઃఆͷΠϯϙʔτํ๏ɺಠࣗઃఆͷઃఆํ๏Λ঺հ͠·͢ɻ 2.2 MacOS Catalina ͷ৔߹ MacOS Λ Catalina ʹόʔδϣϯΞοϓ͍ͯ͠Δͱɺඪ४Ͱ͸ Karabiner- Elements ͕࢖͑·ͤΜɻ࢖͑ΔΑ͏ʹ͢Δํ๏Λ঺հ͠·͢ɻ Mac ͷઃఆΛ։͖ɺSecurity & Privacy ˠ Input Monitoring Λબ୒͠·͢ɻ Terminal Λ։͍ͯ Karabiner Elements ͷ bin ϑΝΠϧ͕͋Δ৔ॴΛ։͖· ͢ʢλʔϛφϧͰʢopen /Library/Application\ Support/org.pqrs/Karabiner- Elements/bin/ʣΛೖྗͨ͠΄͏͕ૣ͍͔΋ʣ ɻ ։͍ͨϑΥϧμ͔Βɺkarabiner_grabber ͱ karabiner_observer Λ Input Mon- itoring ʹυϥοάˍυϩοϓ͠·͢ɻ΋͠ɺInput Monitoring ͷதʹԿͷϑΝΠ ϧ΋ೖ͓ͬͯΒͣɺϑΝΠϧͷ௥Ճ͕Ͱ͖ͳ͍৔߹͸ Karabiner-EventViewer Λى ಈ͢ΔͱͦΕ͕ Input Monitoring ʹ௥Ճ͞ΕΔͷͰɺଞͷϑΝΠϧ΋ೖΕΒΕΔΑ ͏ʹͳΓ·͢ɻ ࠷ޙʹɺTerminal ͰҎԼͷίϚϯυΛ࣮ߦ͠ɺ௥Ճ͞Εͨ̎ϑΝΠϧΛҰ୴ऴྃ 19
  5. ͋ͱ͕͖ ͜ͷຊΛखʹͱ͍͖ͬͯͨͩ͋Γ͕ͱ͏͍͟͝·͢ɻ ΩʔόΠϯυઃఆͷํ๏Λ঺հ͠·ͨ͠ɻචऀͷମײͰ͸ɺԕ͍Ωʔ΍ͪΐͬͱ͠ ͨϚ΢εҠಈͷͨΊʹϗʔϜϙδγϣϯ͔ΒखΛ཭͞ͳ͘ͳͬͨͨΊ 35 ˋ΄Ͳ༨ܭ ͳಈ͖͕ͳ͘ͳΓɺָʹͳΓ·ͨ͠ɻͥͻɺ͍Ζ͍Ζͳࣗ෼޷ΈͷઃఆΛߟ࣮͑ͯ૷ ͍ͯͩ͘͠͞ɻ චऀ͸ɺΩʔόΠϯυઃఆΛߟ࣮͑ͯ૷͍ͯ͘͠͏ͪʹࢦΛͳΔ΂͘ԕ͘ʹಈ͔͞ ͳ͍Α͏ʹͨ͘͠ͳΓ·ͨ͠ɻͦͷͨΊɺΩʔͷ਺͕ݮ͍ͬͯΔࣗ࡞ΩʔϘʔυʹ

    Ҡߦ͠·ͨ͠ɻࣗ࡞ΩʔϘʔυͰ͸ɺqmk_firmware ͱ͍͏ϑΝʔϜ΢ΣΞͰΩʔ ϚοϓɺΩʔόΠϯυ͕ઃఆͰ͖·͢ɻࠨӈ෼཭ͨ͠ΓɺΩʔͷ਺Λม͑ͨΓɺԡ͠ ৺஍Λม͑ͨΓɺ΅͘ͷ͔Μ͕͍͖͑ͨ͞ΐ͏ͷΩʔϘʔυΛ୳͍ͯ͠·͢ɻࣗ࡞ ΩʔϘʔυ΋໘ന͍Ͱ͢Αɻ ࿩͕ҳΕ·ͨ͠ɻΩʔόΠϯυઃఆΛָ͘͠ߟ͑ɺָʹɺޮ཰తʹೖྗ͍͖ͯ͠· ͠ΐ͏ʂ 2019 ೥ 12 ݄͝·ͳͭ 40
  6. ஶऀ঺հ • ͝·ͳͭ ϝʔΧࢠձࣾۈ຿ 2 ೥໨ɻۀ຿͸ C#Ͱ windows ΞϓϦΛ࡞͍ͬͯ·͢ɻझຯͷ PC

    ήʔϜ͔ΒΩʔϘʔυʹڵຯΛ࣋ͪɺ͍Ζ͍ΖͳΩʔϘʔυΛങͬͨ݁Ռɺࣗ࡞ ΩʔϘʔυʹߦ͖͍ͭͨਓɻࣗ࡞ΩʔϘʔυ·Ͱ͸ख͕ग़ͳ͍ͱ͍͏ਓʹ΋ɺΩʔό ΠϯυઃఆͰࣗ෼޷ΈͷΩʔϘʔυʹͰ͖Δ͜ͱΛ఻͍͖͍͑ͯͨɻଞͷझຯ͸Ϙʔ υήʔϜɺΧʔυήʔϜɺήʔϜηϯλʔɻήʔϜηϯλʔͷಉਓࢽ΋ग़ͯ͠·͢ɻ Twitter @akrolayer https://twitter.com/akrolayer 41