yqrashawn / GokuRakuJoudo

config karabiner with ease
GNU General Public License v3.0
1.16k stars 121 forks source link

Pointing Button with Modifier causes error #115

Closed MunifTanjim closed 3 years ago

MunifTanjim commented 3 years ago

This EDN

  {:des "Ctrl+Left Click => Cmd+Left Click (select multiple items)"
   :rules [[:!Tbutton1 :!Cbutton1]]}

generates JSON:

      {
        "description" : "Ctrl+Left Click => Cmd+Left Click (select multiple items)",
        "manipulators" : [ {
          "from" : {
            "key_code" : "button1",
            "modifiers" : {
              "mandatory" : [ "left_control" ]
            }
          },
          "to" : [ {
            "key_code" : "button1",
            "modifiers" : [ "left_command" ]
          } ],
          "type" : "basic"
        } ]
      }

It causes this error:

image

It should be pointing_button instead of key_code

yqrashawn commented 3 years ago

It should be [{:pkey :button1 :modi :left_control} {:pkey :button1 :modi :left_command}].

The doc is in the code. Seems we should put it in the tutorial. https://github.com/yqrashawn/GokuRakuJoudo/blob/05847304bcd3c6fdb4e62652bb81acd88a76700d/src/karabiner_configurator/froms.clj#L18

farzadmf commented 2 years ago

Hey,

I'm using this rule, but it doesn't seem to change anything (ctrl-click still behaves as it was before):

{
  :main [
    { :des "ctrl-click -> cmd-click?"
      :rules [
        [{:pkey :button1 :modi :left_control} {:pkey :button1 :modi :left_command}]
      ]
    }
  ]
}

I'm guessing this rule should do with the :des is saying, right? Do I need to configure something else for this to work? 🤔

Thank you

MuhammedZakir commented 2 years ago

In Karabiner-Elements > Devices tab, is input modification enabled for your mouse/touchpad? IIRC, they're disabled by default.

farzadmf commented 2 years ago

Great, thank you @MuhammedZakir , that took care of one issue

But another issue I have is that the combination of ctrl from built-in keyword + touchpad click doesn't seem to be picked up

Actually, put more precisely: When I hold ctrl on my external/internal keyboard and click with external mouse, the behavior is as intended, but for some reason, the touchpad click doesn't seem to care 🙁, and it's still doing the old ctrl-click

MuhammedZakir commented 2 years ago

I don't know about external trackpad, but you can't modify events from built-in trackpad. There seems to be some issues when trying to do that, so it's disabled / not implemented.

farzadmf commented 2 years ago

Ah too bad 🙁 , I needed it for internal tackpad mostly