tpkb icon indicating copy to clipboard operation
tpkb copied to clipboard

How to fully quit Karabiner-elements?

Open mgraham opened this issue 3 years ago • 4 comments

Before running tpkb, I quit Karabiner-Elements from its menu, and I can verify that my keyboard has lost all of its mappings.

Then I run tpkb and get this:

sudo  ~/tpkb/tpkb/tpkb/tpkb
password:
TP Keyboard not found. Possible solutions:
 * Have you run tpkb with 'sudo'?
 * Make sure you don't have keyboard customizers running (for example Karabiner)
Detected devices:
VID: 0x17EF     PID: 0x6048     Manufacturer: Unknown
VID: 0x17CC     PID: 0x1360     Manufacturer: Native Instruments
VID: 0x16C0     PID: 0x27DA     Manufacturer: pqrs.org
VID: 0x05AC     PID: 0x0274     Manufacturer: Apple Inc.
VID: 0x05AC     PID: 0xFFFF     Manufacturer: Apple
VID: 0x0B33     PID: 0x0030     Manufacturer: Contour Design
VID: 0x05AC     PID: 0x0274     Manufacturer: Apple Inc.
VID: 0x05AC     PID: 0x0274     Manufacturer: Apple Inc.
VID: 0x05AC     PID: 0x0274     Manufacturer: Apple Inc.
VID: 0x05AC     PID: 0x0274     Manufacturer: Apple Inc.
VID: 0x05AC     PID: 0x0274     Manufacturer:
VID: 0x16C0     PID: 0x27DB     Manufacturer: pqrs.org

pqrs.org appears in that list twice, and I'm sure it is something to do with Karabiner-Elements.

Any idea what I should do to fully shut down Karabiner-Elements? Do I need to uninstall it?

mgraham avatar Jan 19 '21 01:01 mgraham

Actually, I tried uninstalling Karabiner-elements (and rebooting), and now I get:

sudo  ~/tpkb/tpkb/tpkb/tpkb
TP Keyboard not found. Possible solutions:
 * Have you run tpkb with 'sudo'?
 * Make sure you don't have keyboard customizers running (for example Karabiner)
Detected devices:
VID: 0x05AC     PID: 0x0274     Manufacturer: Apple Inc.
VID: 0x05AC     PID: 0x0274     Manufacturer: Apple Inc.
VID: 0x05AC     PID: 0x0274     Manufacturer: Apple Inc.
VID: 0x05AC     PID: 0x0274     Manufacturer: Apple Inc.
VID: 0x05AC     PID: 0xFFFF     Manufacturer: Apple
VID: 0x05AC     PID: 0x0274     Manufacturer: Apple Inc.
VID: 0x0B33     PID: 0x0030     Manufacturer: Contour Design
VID: 0x17EF     PID: 0x6048     Manufacturer: Unknown
VID: 0x17CC     PID: 0x1360     Manufacturer: Native Instruments
VID: 0x05AC     PID: 0x0274     Manufacturer:

mgraham avatar Jan 19 '21 01:01 mgraham

When I have Karabiner-Elements running, the devices page of the Event Viewer shows this entry:

    {
        "device_id": 4294971928,
        "is_karabiner_virtual_hid_device": false,
        "is_keyboard": true,
        "is_pointing_device": true,
        "location_id": 1630113796,
        "manufacturer": "Unknown",
        "product": "ThinkPad Compact Bluetooth Keyboard with TrackPoint",
        "product_id": 24648,
        "serial_number": "xx-xx-xx-xx-xx-xx",
        "transport": "Bluetooth",
        "vendor_id": 6127
    }

Product ID of 24648 is 0x6048 in Hex, so I believe that is this line in the tpkb output:

VID: 0x17EF     PID: 0x6048     Manufacturer: Unknown

mgraham avatar Jan 19 '21 06:01 mgraham

It turned out that my last problem was due to not granting iTerm Input Monitoring permission under Catalina.

So the following worked for me:

  1. uninstall Karabiner-Elements
  2. reboot
  3. grant Input Monitoring permission to iTerm
  4. run sudo tpkb
  5. re-install Karabiner-Elements (including enabling the permission it asks for)

Yay! Function keys again!

It's a bit of a hassle, but not too bad because I don't have to do it very often. My Thinkpad keyboard remembers its function key settings unless its battery runs completely down. And Karabiner-Elements remembers my config file between installs, so the uninstall/reinstall dance isn't a big deal.

mgraham avatar Jan 30 '21 08:01 mgraham

My keyboard lost its function keys again and this time I realized it can be fixed without a reboot:

  1. uninstall Karabiner-Elements
  2. grant Input Monitoring permission to iTerm (if necessary)
  3. run sudo tpkb
  4. re-install Karabiner-Elements (including enabling the permission it asks for)

This works and is pretty quick.

mgraham avatar Mar 06 '21 04:03 mgraham