Using a laptop as a Bluetooth keyboard (or mouse)

    The thought just came to my mind - is it possible to connect a laptop via Bluetooth to a phone / tablet / etc, so that you can print text on a computer, and transmitted keystrokes to a mobile device.

    It turns out that this is already implemented as a ready-made program, which turned out to be quick enough to google on request linux emulate bluetooth mouse .

    It is called hidclient . Runs on Linux computers with Bluetooth.

    Theoretically, you can transfer events from the keyboard or mouse to any device that supports the connection of HID devices via Bluetooth. In practice, I tried this with an iPod - it works great.

    So suppose you have Ubuntu. You will need the header files:

    apt-get install libbluetooth-dev
    

    Next, download the source . Everything is simple here: you need to unzip the tarball, go to the directory into which you unpacked it, and execute it make.

    Make changes to /etc/bluetooth/main.conf:

    • DisablePlugins = input
    • Class = 0x000540

    Launch hidclient and connect to your mobile device. This is convenient to do through the Bluetooth Manager (blueman-manager).

    By the way, if you have several HID devices, then you can choose which one you would like to use. That is, you can, for example, have two keyboards connected at once - from one event they will be used only by a computer (X-server), and from the other only by a mobile device.

    Information was collected very quickly thanks to Eliah Kagan ( How do I make Ubuntu appear as a bluetooth keyboard? ) And Capt.Nemo ( Setup a linux computer to act as a bluetooth keyboard / mouse ).

    I wish everyone a pleasant time in the console, and have a nice weekend!

    Also popular now: