Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: linux mouse wheel #3

Closed
Berryfier opened this issue Jun 21, 2015 · 2 comments
Closed

Enhancement: linux mouse wheel #3

Berryfier opened this issue Jun 21, 2015 · 2 comments
Assignees

Comments

@Berryfier
Copy link

I suggest the following for linux users wanting to use their mouse wheel in CC.pyw config
Tested on raspberry pi raspbian only.

under
    def MenuConfig_WheelScroll(self, event):
remove Windows statement
        self.controlcanvas.yview_scroll(-1*(event.delta/120), "units")
add Linux and Windows statements
        if event.num == 5: # linux scroll down
            self.controlcanvas.yview_scroll(1, "units")
        elif event.num == 4: # linux scroll up
            self.controlcanvas.yview_scroll(-1, "units")
        else: # windows scroll event
            self.controlcanvas.yview_scroll(-1*(event.delta/120), "units")

under
        self.controlcanvas = Canvas(self.controlselect)
        self.controlcanvas.bind_all("<MouseWheel>", self.MenuConfig_WheelScroll)
add for use with Linux OS
        self.controlcanvas.bind_all("<Button-4>", self.MenuConfig_WheelScroll)
        self.controlcanvas.bind_all("<Button-5>", self.MenuConfig_WheelScroll)


under
    def UnbindAll(self):
        self.master.unbind_all("<MouseWheel>")
add 
        self.master.unbind_all("<Button-4>")
        self.master.unbind_all("<Button-5>")

@deltaflyer4747
Copy link
Owner

Will do

deltaflyer4747 pushed a commit that referenced this issue Aug 12, 2015
- Linux mouse scroll: #3
- cleanup: #6
@deltaflyer4747
Copy link
Owner

Implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants