Giter VIP home page Giter VIP logo

logitech-m720-config's People

Contributors

fin-ger avatar lior-zl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

logitech-m720-config's Issues

volumenup and volumendown

Hello! I have a question. I need to change a button to increase or decrease the volume. How and where can it be configured in the script?
I'm sorry for my English.

How to undo changes

Hi, thanks for the great script.

I've ran it with the defaults for testing purposes, but that's not what I wanted to keep forever.
Now both buttons 0x53 and 0xD0 work as "back" button.

I've tried to reset my thumb button to not doing anything like before by changing the code to buttons.set_cid_reporting (0x53, False, False, True, True, False, False, 0x53), but that doesn't seem to work.

How can I undo the changes?

Thanks!

m720-config script fails to run

Thanks for creating this repo. I was trying to get the Logitech M720 buttons and gestures to work on Arch Linux (kernel: 15.14.12) and installed this package, which successfully installed, but I'm having some issues when I try to run the script. Here's the output:

% m720-config
DeviceInfo(path='/dev/hidraw0', vendor_id='046D', product_id='C52B', serial='', release=None, manufacturer=None, product=None, interface=2, driver='logitech-djreceiver', bus_id=3, isDevice=None)
open DeviceInfo(path='/dev/hidraw0', vendor_id='046D', product_id='C52B', serial='', release=None, manufacturer=None, product=None, interface=2, driver='logitech-djreceiver', bus_id=3, isDevice=None)
Traceback (most recent call last):
  File "/home/mark/.local/lib/python3.9/site-packages/logitech_receiver/receiver.py", line 281, in open
    handle = _base.open_path(device_info.path)
  File "/home/mark/.local/lib/python3.9/site-packages/logitech_receiver/base.py", line 166, in open_path
    return _hid.open_path(path)
  File "/home/mark/.local/lib/python3.9/site-packages/hidapi/udev.py", line 297, in open_path
    return _os.open(device_path, _os.O_RDWR | _os.O_SYNC)
PermissionError: [Errno 13] Permission denied: '/dev/hidraw0'
Traceback (most recent call last):
  File "/home/mark/.local/bin/m720-config", line 33, in <module>
    sys.exit(load_entry_point('m720-config', 'console_scripts', 'm720-config')())
  File "/home/mark/pkg/logitech-m720-config/m720_config/__init__.py", line 149, in main
    buttons = SpecialKeysMseButtons ()
  File "/home/mark/pkg/logitech-m720-config/m720_config/__init__.py", line 29, in __init__
    self.receiver = Receiver.open (device_info)
  File "/home/mark/.local/lib/python3.9/site-packages/logitech_receiver/receiver.py", line 281, in open
    handle = _base.open_path(device_info.path)
  File "/home/mark/.local/lib/python3.9/site-packages/logitech_receiver/base.py", line 166, in open_path
    return _hid.open_path(path)
  File "/home/mark/.local/lib/python3.9/site-packages/hidapi/udev.py", line 297, in open_path
    return _os.open(device_path, _os.O_RDWR | _os.O_SYNC)
PermissionError: [Errno 13] Permission denied: '/dev/hidraw0'

Seeing those permission errors I figured that the script was being prevented from touching /dev so I ran as root, which was also unsuccessful:

% sudo m720-config
[sudo] password for mark: 
Traceback (most recent call last):
  File "/home/mark/.local/bin/m720-config", line 33, in <module>
    sys.exit(load_entry_point('m720-config', 'console_scripts', 'm720-config')())
  File "/home/mark/.local/bin/m720-config", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
  File "/usr/lib/python3.9/importlib/metadata.py", line 524, in distribution
    return Distribution.from_name(distribution_name)
  File "/usr/lib/python3.9/importlib/metadata.py", line 187, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: m720-config

That appears to not be able to find the m720-config package.
Any help is greatly appreciated!

Installation/utilization unclear

Would you please be a little clearer and more specific about the installation/utilization of this script?

Where is m720-config?

Installing collected packages: m720-config
  Running setup.py develop for m720-config
Successfully installed m720-config
$ m720-config
zsh: command not found: m720-config

sctipt fails to run

Starting the script after installing it, it immediately crashes with the following output

Traceback (most recent call last):
  File "env/bin/m720-config", line 11, in <module>
    load_entry_point('m720-config', 'console_scripts', 'm720-config')()
  File "/home/thomasjones/packages/logitech-m720-config/m720_config/__init__.py", line 149, in main
    buttons = SpecialKeysMseButtons ()
  File "/home/thomasjones/packages/logitech-m720-config/m720_config/__init__.py", line 25, in __init__
    device_info = next (r for r in receivers () if r.product_id.lower() == "c52b")
StopIteration

I tried installing it as in the readme, and the uninstalling and doing it again with Ubuntu instructions and in a venv, same results

Won't run even connected with logitech receiver.

I'm getting the same error as #4, but my mouse is connected via the receiver and using Solaar.

Traceback (most recent call last):
  File "/home/elio/.local/bin/m720-config", line 33, in <module>
    sys.exit(load_entry_point('m720-config', 'console_scripts', 'm720-config')())
  File "/home/elio/Downloads/logitech-m720-config/m720_config/__init__.py", line 149, in main
    buttons = SpecialKeysMseButtons ()
  File "/home/elio/Downloads/logitech-m720-config/m720_config/__init__.py", line 25, in __init__
    device_info = next (r for r in receivers () if r.product_id == "c52b")
StopIteration

I'm on elementary OS 5, based on Ubuntu 18.04.

Configuration is not working when connected over Bluetooth

Hi, trying this on Manjaro/Arch and it fails with the following output

[ltachev@enterprise logitech-m720-config]$ m720-config 
Traceback (most recent call last):
  File "/home/ltachev/.local/bin/m720-config", line 11, in <module>
    load_entry_point('m720-config', 'console_scripts', 'm720-config')()
  File "/home/ltachev/logitech-m720-config/m720_config/__init__.py", line 149, in main
    buttons = SpecialKeysMseButtons ()
  File "/home/ltachev/logitech-m720-config/m720_config/__init__.py", line 25, in __init__
    device_info = next (r for r in receivers () if r.product_id == "c52b")
StopIteration

Mouse is paired via Bluetooth.
Does your script only work when paired with the Logitech receiver ??
thanks.

AttributeError: type object 'int' has no attribute 'from_bytes'

Hello, im trying to use your code but i have an iisue.
pip install was complaining to install solaar, so i got the ubuntu package and modified m720-config and added its path "sys.path.append('/usr/share/solaar/lib/')"
This did the trick but im having another issue:


m720-config     
Traceback (most recent call last):
  File "/home/luis/.local/bin/m720-config", line 12, in <module>
    load_entry_point('m720-config', 'console_scripts', 'm720-config')()
  File "/tmp/logitech-m720-config-master/m720_config/__init__.py", line 150, in main
    cids = print_cid_info (buttons)
  File "/tmp/logitech-m720-config-master/m720_config/__init__.py", line 124, in print_cid_info
    cnt = buttons.get_count ()
  File "/tmp/logitech-m720-config-master/m720_config/__init__.py", line 43, in get_count
    return int.from_bytes (self.m720.request ((self.feature_index << 8) + (0 << 4) + self.software_id), byteorder='little')
AttributeError: type object 'int' has no attribute 'from_bytes'

Can you give me any tips to fix this problem?

Just in case, the original instructions caused this error:

Collecting solaar (from m720-config==0.0.1)
  Using cached https://files.pythonhosted.org/packages/c8/c5/8940f78388854e208ed1cb04500284e304ca843a51e7de7f439fd03242df/solaar-0.9.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-jmKvK1/solaar/setup.py", line 11, in <module>
        from solaar import NAME, __version__
    ImportError: No module named solaar
    
//    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-jmKvK1/solaar/

Thanks :)

Button 8 question.

Hello,

I'm about to receive an M720 and saw your script, thanks for that. But I don't understand what does the sentence "This script will map Button 8 on the thumb button by default" mean ?

Can you explain it ?

And in the owner manual (see below) the thumb button is 7 and 8 is "dual connectivity" :

PRODUCT FEATURES
1 Easy-switch
2 Forward button
3 Back button
4 Toggle & connect button
5 Hyper-fast scroll-wheel
6 Battery LED
7 Thumb button
8 Dual Connectivity
9 Battery & Receiver storage

Thank you.

AssertionErrorS

m720-config

timeout (1.80/1.80) on device 255 request {83B5} params [03]
open DeviceInfo(path='/dev/hidraw6', vendor_id='046d', product_id='c52b', serial='', release=b'1208', manufacturer=b'Logitech', product=b'USB Receiver', interface=2, driver='hid-generic')
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/logitech_receiver/receiver.py", line 531, in open
    return Receiver(handle, device_info)
  File "/usr/lib/python3.7/site-packages/logitech_receiver/receiver.py", line 341, in __init__
    assert serial_reply
AssertionError
Exception ignored in: <function Receiver.__del__ at 0x7f7d1613d200>
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/logitech_receiver/receiver.py", line 370, in __del__
    self.close()
  File "/usr/lib/python3.7/site-packages/logitech_receiver/receiver.py", line 366, in close
    self._devices.clear()
AttributeError: 'Receiver' object has no attribute '_devices'
Traceback (most recent call last):
  File "/home/mathieu/.local/bin/m720-config", line 11, in <module>
    load_entry_point('m720-config', 'console_scripts', 'm720-config')()
  File "/home/mathieu/Git/logitech-m720-config/m720_config/__init__.py", line 148, in main
    buttons = SpecialKeysMseButtons ()
  File "/home/mathieu/Git/logitech-m720-config/m720_config/__init__.py", line 29, in __init__
    assert self.receiver
AssertionError

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.