Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub の issue なり PR の description なりは 書き上がってから submit したい派なんだけど、なんかのショートカットキーを押してしまうのかタブを閉じてしまい、閉じたタブを開く をしても書きかけだった情報が吹っ飛んでて泣くのをなんとかしたい #89

Closed
kachick opened this issue May 28, 2021 · 8 comments
Labels

Comments

@kachick
Copy link
Owner

kachick commented May 28, 2021

TL;DR

  • 助けて

何についてか / About

  • ここ半年程? GitHub の issue なり PR の description なり、長文書いてるときにタブが閉じる
  • 老化のせいでなんかのショートカットキー押してるのか、なんかのショートカットキーが勝手に増えやがったのかは知らない
  • 使ってるブラウザは Chrome、OSは Mac OS X
  • 閉じたタブを開く を押すとタブは戻るが、書きかけだった内容が吹っ飛んでいる
  • エディタで下書きしておけば良いんだろうけど、面倒
  • ちょいちょい書いて、保存して、書き直せば良いんだろうけど、基本的には書き上げてから submit したい気持ちが強い。まぁ結局後から編集したりはするけども。
  • こんな感じの悩みは、ちょっと違うが大昔のCGI掲示板とかでも無かったっけ・・・?サブミットしたら文字数制限とか時間切れで弾かれて、書き直すときに全部消えてるとか・・・まぁ内容は大分違うが、ツラミが近い
@kachick kachick added help wanted Extra attention is needed question Further information is requested wontfix This will not be worked on labels May 28, 2021
@kachick
Copy link
Owner Author

kachick commented May 28, 2021

https://support.google.com/chrome/answer/157179?hl=ja#zippy=%2C%E3%82%BF%E3%83%96%E3%81%A8%E3%82%A6%E3%82%A3%E3%83%B3%E3%83%89%E3%82%A6%E3%81%AE%E3%82%B7%E3%83%A7%E3%83%BC%E3%83%88%E3%82%AB%E3%83%83%E3%83%88

スクリーンショット 2021-05-29 0 08 20

⌘+w で確かに落ちるな・・・貴様か 👀 🔪

しかしそれより気になるのは

Mac Catalina 以上のシステム設定では、キーボード ナビゲーションがデフォルトでオンになっています。

Catalina 以上にしたのは大分前な気がするので時差が気になるが、これのせいでは・・・? Big Sur 化時に enabled になったとか?

https://superuser.com/questions/576728/disable-google-chrome-keyboard-shortcuts

とか見ているが、具体的に off にする方法がわからんな?

スクリーンショット 2021-05-29 0 16 34

の一覧にも Chrome 出てこないし・・・

@kachick
Copy link
Owner Author

kachick commented May 28, 2021

https://medium.com/@taroleo/mac-chrome-shortcuts-b50cdbd65229
https://apple.stackexchange.com/questions/390234/disable-cmd-w-on-macos-catalina#

みて、 Close とか Close Tab みたいな別キーバインドでの設定を入れてみたが、うまく行かない・・・え、オフに出来ない?
Mac固有の原因だったりするんだったら、本気で #7 みたいに Mac やめる事検討するか・・・?
Firefox には無い問題だったりするんだろうか #50

@kachick
Copy link
Owner Author

kachick commented May 29, 2021

こうなったらサードパーティでもなんでも頼るぞ!と思って、

https://github.com/mikecrittenden/shortkeys

とやらを入れてみたが

スクリーンショット 2021-05-29 10 06 11

ここの Close tab をいじってもダメだった・・・

https://github.com/mikecrittenden/shortkeys/wiki/FAQs-and-Troubleshooting#can-i-use-shortkeys-to-disable-a-core-browser-shortcut

スクリーンショット 2021-05-29 10 07 29

これは、 Chrome の問題なのか・・・?
キーボードショートカットオフにさせてくれないの・・・?

スクリーンショット 2021-05-29 10 27 17

こんなんやってみたが動かず。
使えるキーバインドにバリデーション効かないようであれだが、 command とか試してもダメだった。

https://github.com/mikecrittenden/shortkeys/wiki/How-To-Use-Shortkeys

にも載ってるとおりだしなぁ・・・

スクリーンショット 2021-05-29 10 28 33

@kachick
Copy link
Owner Author

kachick commented May 29, 2021

https://developer.chrome.com/docs/extensions/reference/commands/

スクリーンショット 2021-05-29 10 12 17

たまに出てくる chrome://extensions/configureCommands とやらにアクセス出来ないんだよなぁ・・・

@kachick
Copy link
Owner Author

kachick commented May 29, 2021

うおー! Karabiner-Elements で無理やりオフにしてやったぞ・・・!

https://github.com/pqrs-org/KE-complex_modifications/tree/ccaba3f7c6d23581a695a2ac95efe161ba3a3183#testing-your-own-rules

他のを見様見真似で、こんな感じの json を

{
  "title": "Disable Cmd+W Close Window ref: https://github.com/kachick/times_kachick/issues/89",
  "rules": [
    {
      "description": "Disable Cmd+W Close Window (map to spacebar)",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "key_code": "w",
            "modifiers": {
              "mandatory": [
                "command"
              ]
            }
          },
          "to": [
            {
              "key_code": "spacebar"
            }
          ]
        }
      ]
    }
  ]
}

~.config/karabiner/assets/complex_modifications/disable-cmd-w.json に置いて、

スクリーンショット 2021-05-29 10 56 18

ロードして、 Enable にしてやった・・・!
Mac OS 自体の command+w で ウィンドウを閉じるという挙動自体を止めてしまうわけだが、個人的にそんなもん使ったこと無いし使いたいとも思わないのでせいせいした。
世界のどっかで同じような苦しみを味わってる人がいないとも言えないので、どっかでPR投げようかな。

しかし、この キーバインド集みたいなのが unlicense なのはまぁわかるが、 https://github.com/pqrs-org/Karabiner-Elements 自体も unlicense なのか。 Mac OS X ユーザーにとっては必須だと思うのだが、偉大である。 🙏

@kachick
Copy link
Owner Author

kachick commented May 29, 2021

とりあえず unlicense/unlicense.org#80 unlicense.org 側に 是非載せておいてもらいたいとPRを出した。ただ、メンテ止まってる感あるので(よくある話だ)、どうなるかは知らない。

@kachick kachick added tips and removed help wanted Extra attention is needed question Further information is requested wontfix This will not be worked on labels May 29, 2021
@kachick
Copy link
Owner Author

kachick commented Jun 8, 2021

screen_shot 2021-06-08 22 36 46

大分前に犯人が Command + w であることは @pankona さんから指摘されてたのにすっかりわすれていたんだな・・・

@kachick
Copy link
Owner Author

kachick commented Jun 25, 2022

#156 最近もっぱら windows ばっか使ってたけど、その前の段階でもこの問題は収まってたかな?

@kachick kachick closed this as completed Jun 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant