2020/10/13

macの音量調整を常に1/4段階にする

 Karabiner-Elementsを使用します。インストール後、~/.config/karabiner/assets/complex_modificationsディレクトリに、always_small_step_vol_control.jsonなどという名前でjsonという拡張子のファイルを設置。その中身は以下。

  1. {
  2. "title": "Always small step vol control",
  3. "rules": [
  4. {
  5. "description": "Always enable small step change of volume",
  6. "manipulators": [
  7. {
  8. "type": "basic",
  9. "from": {
  10. "key_code": "f11",
  11. "modifiers": {
  12. }
  13. },
  14. "to": [
  15. {
  16. "key_code": "volume_decrement",
  17. "modifiers": [ "shift", "option" ]
  18. }
  19. ]
  20. },
  21.  
  22. {
  23. "type": "basic",
  24. "from": {
  25. "key_code": "f12",
  26. "modifiers": {
  27. }
  28. },
  29. "to": [
  30. {
  31. "key_code": "volume_increment",
  32. "modifiers": [ "shift", "option" ]
  33. }
  34. ]
  35. }
  36.  
  37. ]
  38. }
  39. ]
  40. }


その後、Karabiner-Elementsの設定から、Complex modifications -> Add rule -> Enableとする。コードが間違っていると表示されないので、文法ミスに気をつけなければならない。

もしかすると、Karabiner-Elementsの設定にて、Virtual keyboradのCountry codeを45(jis配列キーボード)にしないといけないかもしれない。