barnabycolby / MMM-Carousel

Displays a single magic mirror module at a time, rotating through the list of configured modules in a carousel-like fashion.
98 stars 33 forks source link

Change Pages with NumPad #33

Open Alfniator opened 1 year ago

Alfniator commented 1 year ago

I have the issue that I can't get my NumPad getting to work. I have tried a lot, reading in different topics. Since I'm not sure where to raise the issue, I have raised it at both MMM-carousel and MMM-KeyBindings, here is the reference.

1.) I have a NumPad, and I have checked the KeyPresses with (sudo evtest /dev/input/event0) Event: time 1675020513.475983, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70050 Event: time 1675020513.475983, type 1 (EV_KEY), code 105 (KEY_LEFT), value 0 Event: time 1675020524.621614, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7004f Event: time 1675020524.621614, type 1 (EV_KEY), code 106 (KEY_RIGHT), value 1

This tells me that the NumPad is recognised, and also that the ArrowKeys are correctly interpreted as KEY_LEFT and KEY_RIGHT.

2.) Finally, I also followed the code in this link who got it to work, but in my case it fails.

Version Carousel: MMM-Carousel w/ Slide Navigation link Version KeyBindings: MMM-KeyBindings - Remote and Keyboard Control for MagicMirror link

The current code I have implemented in the MagicMirror can be found below:

{
            module: 'MMM-KeyBindings',
            config: {
                evdev: {enabled: false},
                enableKeyboard: true,
                actions: [
                    {
                    key: "ArrowRight",
                    state: "KEY_PRESSED",
                    instance: "SERVER",
                    mode: "DEFAULT",
                    },
                    {
                    key: "ArrowLeft",
                    state: "KEY_PRESSED",
                    instance: "SERVER",
                    mode: "DEFAULT",
                    },  
                ]
            }
        },

        {
            module:'MMM-Carousel',
            position: 'bottom_bar',
            config: {
                transitionInterval: 10000,
                ignoreModules: ['clock','MMM-Wallpaper'],
                mode: 'slides',
                showPageIndicators: true,
                showPageControls: true,
                slides: {
                    main: ['calendar', 'MMM-MicrosoftToDo', 'weather','newsfeed'],
                    "SlideOne": [],
                    "SlideTwo": [],
                    "SlideThree": [],
                    },

                keyBindings: {
                    enabled: true,
                    mode: "DEFAULT",
                    map:{
                        NextSlide: "ArrowRight",
                        PrevSlide: "ArrowLeft",
                        Slide2:    "Home"
                        },
                    }
                }
        },

I will try any advise on short term notice and reply feedback.

KristjanESPERANTO commented 1 year ago

The module is no longer maintained here. Please use the following fork: https://github.com/shbatm/MMM-Carousel