{"id":15495524,"url":"https://github.com/coddingtonbear/logitech-flow-kvm","last_synced_at":"2025-04-22T20:41:45.326Z","repository":{"id":65129427,"uuid":"582442420","full_name":"coddingtonbear/logitech-flow-kvm","owner":"coddingtonbear","description":"Quickly switch between paired devices when using a Logitech mouse and keyboard that supports connecting to multiple devices.","archived":false,"fork":false,"pushed_at":"2023-04-12T19:21:24.000Z","size":148,"stargazers_count":24,"open_issues_count":3,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-10-19T12:38:03.599Z","etag":null,"topics":["kvm","linux","logitech","solaar"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coddingtonbear.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-26T21:10:41.000Z","updated_at":"2024-10-10T01:29:35.000Z","dependencies_parsed_at":"2024-10-02T08:17:34.619Z","dependency_job_id":"075dee88-0f4a-4953-8420-07a90d45aaf8","html_url":"https://github.com/coddingtonbear/logitech-flow-kvm","commit_stats":{"total_commits":58,"total_committers":2,"mean_commits":29.0,"dds":0.1724137931034483,"last_synced_commit":"82b7ec0116d5bde232382513c5fe596d0c363ac0"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coddingtonbear%2Flogitech-flow-kvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coddingtonbear%2Flogitech-flow-kvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coddingtonbear%2Flogitech-flow-kvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coddingtonbear%2Flogitech-flow-kvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coddingtonbear","download_url":"https://codeload.github.com/coddingtonbear/logitech-flow-kvm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250320130,"owners_count":21411309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kvm","linux","logitech","solaar"],"created_at":"2024-10-02T08:17:29.762Z","updated_at":"2025-04-22T20:41:45.303Z","avatar_url":"https://github.com/coddingtonbear.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![header-image](http://coddingtonbear-public.s3.amazonaws.com/github/logitech-flow-kvm/mx_keys_buttons.jpg)\n\nQuickly switch between paired devices when using a Logitech mouse and keyboard that supports connecting to multiple devices.\n\nDo you use Logitech devices that support multiple hosts and find it a little frustrating how tedious it is to switch between hosts when you're using Linux due to Logitech's \"Flow\" features being unsupported there?  Good news: you can have \"Flow\"-like features on Linux now, too.\n\nThis utility works by monitoring one of your attached Logitech devices to see what host it is currently connected to, and then, if that host changes, instructing other connected devices to switch to the same host.\n\n# Features\n\n- Automatically switches all devices from one host to another when just one of your devices switches hosts.  This is particularly useful if you are using a a device like the MX Keys Mini which includes buttons that can be used for switching hosts with a single keypress.\n- Securely keeps clipboards in sync when switching between hosts. Now you can copy/paste from one host to another without thinking anything about it.\n\n# Installation\n\n```\npip install logitech-flow-kvm\n```\n\nYou can also install the in-development version with:\n\n```\n\npip install https://github.com/coddingtonbear/logitech-flow-kvm/archive/master.zip\n\n```\n\n# Basic Use\n\nOne of your computers will serve as the \"server\" for managing this, and all others will be \"clients\".\n\n## Server\n\nOn the computer you've decided to use as your server, get the ID of the device you'd like to serve as your \"leader\", and the IDs of other devices you'd like to use as \"followers\".  The leader device -- I recommend using your keyboard -- will be the one we watch.  The followers will just be told which host to connect to if your leader device's host changes.\n\n```\n\u003e logitech-flow-kvm list-devices\n\n┏━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓\n┃ ID             ┃ Product ┃ Name                       ┃ Serial   ┃\n┡━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩\n│ /dev/hidraw4:1 │ B369    │ MX Keys Mini               │ 08F5F681 │\n│ /dev/hidraw5:1 │ 4082    │ MX Master 3 Wireless Mouse │ 0F591C09 │\n└────────────────┴─────────┴────────────────────────────┴──────────┘\n```\n\nIn this example, I'll be using my keyboard (`/dev/hidraw4:1`) as my \"leader\", and my mouse (`/dev/hidraw5:1`) as a follower.\n\nYou can run a command like this:\n\n```\n\u003e logitech-flow-kvm flow-server 1 /dev/hidraw4:1 /dev/hidraw5:1\n```\n\nNote that the `1` in the above command immediately after `flow-server` indicates that the host number of your server is `1`.  This should match the host number you've paired your mouse and keyboard with your device as (i.e. when your mouse or keyboard is connected to this computer, the light for `1` is lit on the keyboard or mouse's device selector).\n\nAfter running the above command, you'll receive some output indicating what hostnames the server was bound to; on my computer, this looks like this:\n\n```\n...\n * Running on all addresses (0.0.0.0)\n * Running on http://127.0.0.1:24801\n * Running on http://10.224.224.120:24801\n...\n```\n\nFrom the above lines, you'll want to select an IP address that can be reached from your clients.  In my case, I'll be using `10.224.224.120` for connections from the clients to the server.\n\n## Client\n\nOn the other computers you'd like to use this feature with, you can run the following command:\n\n```\n\u003e logitech-flow-kvm flow-client 2 10.224.224.120\n```\n\nIf this is your first time connecting to this server, you will be walked through a brief pairing process for establishing a secure connection between your server and client instances.  Afterward, the client will connect, gather some configuration options from the server, and will instruct your \"follower\" devices to change their hosts as necessary in the future.\n\nNote that the `2` above after `flow-client` indicates the host number your devices have paired with your computer under.  See \"Server\" above for details.\n\n# How to\n\n## Finding available devices\n\nYou can get a list of available devices using the `list-devices` subcommand:\n\n```\n\u003e logitech-flow-kvm list-devices\n\nFinding devices... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00\n┏━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓\n┃ ID             ┃ Product ┃ Name                       ┃ Serial   ┃\n┡━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩\n│ /dev/hidraw4:1 │ B369    │ MX Keys Mini               │ 08F5F681 │\n│ /dev/hidraw5:1 │ 4082    │ MX Master 3 Wireless Mouse │ 0F591C09 │\n└────────────────┴─────────┴────────────────────────────┴──────────┘\n```\n\n## Switching which host a device is connected to\n\nYou can change the relevant device to your desired host number using the `switch-to-host` command:\n\n```\n\u003e logitech-flow-kvm switch-to-host /dev/hidraw4:1 2\n```\n\nThe above command will tell the device having the id `/dev/hidraw4:1` to connect to whichever device is paired as its #`2` device.\n\n## Running a command when a device connects or disconnects\n\nYou can see when a device connects or disconnects from the receiver using the following example:\n\n```\n\u003e logitech-flow-kvm watch /dev/hidraw4:1\n```\n\nIf you'd like to run a command when a device connects or disconnects, use the `--on-disconnect-execute` or `--on-connect-execute` arguments.  See the \"Automatically switch your mouse to a different host when your keyboard disconnects\" section below for a concrete example of how you might use this.\n\n## Automatically switch your mouse to a different host when your keyboard disconnects\n\nNote: this isn't the recommended way of handling this sort of thing -- you probably want to follow the instructions above under \"Basic Use\" above.\n\nIf you have two devices:\n\n```\n\u003e logitech-flow-kvm list-devices\n\n┏━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓\n┃ ID             ┃ Product ┃ Name                       ┃ Serial   ┃\n┡━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩\n│ /dev/hidraw4:1 │ B369    │ MX Keys Mini               │ 08F5F681 │\n│ /dev/hidraw5:1 │ 4082    │ MX Master 3 Wireless Mouse │ 0F591C09 │\n└────────────────┴─────────┴────────────────────────────┴──────────┘\n```\n\nYou can respond run a command that will listen to when the \"MX Keys Mini\" device above disconnects, and when it does, ask the \"MX Master 3 Wireless Mouse\" to connect to a specific host:\n\n```\n\u003e logitech-flow-kvm watch --on-disconnect-execute=\"logitech-flow-kvm switch-to-host /dev/hidraw5:1 2\" /dev/hidraw4:1\n```\n\n# Credits\n\nMuch of what this tool does is dependent upon the work put together by the folks working on [Solaar](https://github.com/pwr-Solaar/Solaar).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoddingtonbear%2Flogitech-flow-kvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoddingtonbear%2Flogitech-flow-kvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoddingtonbear%2Flogitech-flow-kvm/lists"}