Announcement

Collapse
No announcement yet.

Can you assign actions to keyboard shortcuts modifier+number (ie. super+3)?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can you assign actions to keyboard shortcuts modifier+number (ie. super+3)?

    I am using Latte dock and it has a function to launch applications on it by pressing super+ a number, according to the order of the apps on the launcher. But I found out it does not work for me. Then I noticed that if I try to assign for example super+3 to anything else, like launching Dolphin, it also does not work. I tried this on a clean profile with a test user profile in standard Plasma (no Latte) and it still does not work. I use a Czech keyboard so pressing 3 actually produces "š", but when I change my keyboard layout to English, nothing changes. This also applies to alt and ctrl and shift. Is that also happening for you? I tried looking for bugs but it does not seem to be reported.

    I am on Kubuntu 21.10 and I installed Plasma 5.23 from the PPA, but as I said, I managed to reproduce this on a clean user profile.

    #2
    You shouldn't need to use latte dock to do this. Go to Shorcuts in the settings, there an option to add an application (it's a button with a plus sign on 20.04), which makes an entry for assigning a shortcut to it.

    Comment


      #3
      I know, but I like about the latte setting that it is dynamic (it assigns shortcuts to whatever window I have open right now). But that is not really what I am after. Even if I assign a "super+3" shortcut trhough system settings, it doesn ot work. I do not think this is a Latte issue at all, that was just an sidenote how I found out about this issue.

      Comment


        #4
        Shot in the dark, but is it possible the Super Key has been 'locked'? Some keyboards either have a separate key to lock/unlock the Super Key, or just Function + Super Key to toggle it locked/unlocked.
        Using Kubuntu Linux since March 23, 2007
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Originally posted by Snowhog View Post
          Shot in the dark, but is it possible the Super Key has been 'locked'? Some keyboards either have a separate key to lock/unlock the Super Key, or just Function + Super Key to toggle it locked/unlocked.
          No, this also affects CTRL and ALT. And it is not like he keys are not registered. When I setup an internal keyboard shortcut "super+3" in Vivaldi (a browser), it just works.

          Comment


            #6
            Originally posted by supsup View Post
            I know, but I like about the latte setting that it is dynamic (it assigns shortcuts to whatever window I have open right now). But that is not really what I am after. Even if I assign a "super+3" shortcut trhough system settings, it doesn ot work. I do not think this is a Latte issue at all, that was just an sidenote how I found out about this issue.
            If you click the icon on the window (or alt + f3) and then more actions, it shows an option to create a shortcut to the window. Maybe more what you're looking for.

            Comment


              #7
              Originally posted by Bings View Post

              If you click the icon on the window (or alt + f3) and then more actions, it shows an option to create a shortcut to the window. Maybe more what you're looking for.
              Not really, thanks for suggestion though. I manually have to do that, I like that Latte does it for me. But that is beside the point, the point is numbers + modifiers don't work as shortcuts and neither do they work through what you describe.

              Everybody, thank you for your replies, but am I correct in assuming that you can assign a working shortcut to for example SUPER+3 pr ALT+3?

              Comment


                #8
                What is funny is that inside an application, I can assign a "super+3" to an action (like closing a tab in konsole), so it does not work only for global shortcuts.

                Comment


                  #9
                  This may be specific to Latte Dock, methinks. I have never been able to get meta-number to work, and I run the current release (0.10.6) , often using direct git pulls and building it from source (quite easy actually).
                  I am running Wayland, not sure if that is a cause. I have not logged in to a xorg session in quite a while now to check.
                  Last edited by claydoh; Jan 02, 2022, 02:31 PM.

                  Comment


                    #10
                    Yes, I am on X, should try Wayland. But my problem is bigger:
                    1) It does not work for a new user in Plasma (no Latte)
                    2) It is not just Latte dock, I cannot set super+3 or alt+3 to a kwin action (lets say maximize window).

                    Comment


                      #11
                      Actually...... this worked for me while testing in an xorg session:

                      In Wayland, I noticed that I have 2 Latte Dock entries in the shortcut settings (not unusual it seems). I have seen three instances before. But that is beside the point
                      Latte may be hijacking things, and is sometimes -.....ahem...not quite perfectly bug free. It may be interfering with the shortcuts

                      I booted to Xorg, to see what was going on there just now, and only see one instance. When trying to choose and enable meta-1 etc for latte, I was given a warning about these being already used by Plasma. So I went to that section in the shortcuts config and unticked all the meta-number options from there, and made sure they were all checked under the Latte section. Suddenly the key combos started working, and logging back in to Wayland they are still working.

                      So, I wonder if you exit Latte, delete any Latte section(s) from the shortcuts tool entirely, uncheck the key combos from the Plasma section (or wherever), apply, restart Latte, and try re-enabling the meta-number under the newly regenerated Latte shortcuts section, it might work?

                      Or try not loading Latte at all, and see if you are able to properly config the shortcuts without it running, and having deleted its shortcut section.
                      Last edited by claydoh; Jan 02, 2022, 02:35 PM.

                      Comment


                        #12
                        I have the bug you link - two Latte dock sections and no Plasma section. Turning Latte off and reconfiguring the shortcuts does not seem to change anything / I tried that.

                        But I really think I face a different issue. I cannot assign ctrl+8 to let"s say emoji picker. Any combination of modifier and nubmer does not work for global shortcuts. They work for app/specific shortcuts. Can you assign CTRL+8 }the one above the letters, not the one on the numpad] to stuff<

                        Comment


                          #13
                          I can't follow the details of this thread, but can give this warning: in the past the KDE shortcut handling has been quite flaky and non-deterministic. I think its file for saving shortcuts, ~/.config/kglobalshortcutsrc, becomes a mess. To regain determinism, I've had to resort to clearing out all the existing settings, then adding just the shortcuts I want.
                          Regards, John Little

                          Comment


                            #14
                            Originally posted by supsup View Post
                            I have the bug you link - two Latte dock sections and no Plasma section. Turning Latte off and reconfiguring the shortcuts does not seem to change anything / I tried that.

                            But I really think I face a different issue. I cannot assign ctrl+8 to let"s say emoji picker. Any combination of modifier and nubmer does not work for global shortcuts. They work for app/specific shortcuts. Can you assign CTRL+8 }the one above the letters, not the one on the numpad] to stuff<
                            Odd, my number pad works as expected - I enable the shortcuts as I described, and tested via the my top-row numbers- on my laptop.
                            This morning, I checked, and the numberpad numbers on my PC keyboard(s) are working as expected for these shortcuts.

                            Comment


                              #15
                              Originally posted by jlittle View Post
                              I can't follow the details of this thread, but can give this warning: in the past the KDE shortcut handling has been quite flaky and non-deterministic. I think its file for saving shortcuts, ~/.config/kglobalshortcutsrc, becomes a mess. To regain determinism, I've had to resort to clearing out all the existing settings, then adding just the shortcuts I want.


                              Yup, though Latte is a culprit here, at least partially:

                              My kglobalshortcutsrc has this:


                              [plasmashell]
                              _k_friendly_name=Latte Dock
                              activate task manager entry 1=none,Meta+1,Activate Task Manager Entry 1
                              activate task manager entry 10=none,Meta+0,Activate Task Manager Entry 10
                              activate task manager entry 2=none,Meta+2,Activate Task Manager Entry 2
                              activate task manager entry 3=none,Meta+3,Activate Task Manager Entry 3
                              activate task manager entry 4=none,Meta+4,Activate Task Manager Entry 4
                              activate task manager entry 5=none,Meta+5,Activate Task Manager Entry 5
                              activate task manager entry 6=none,Meta+6,Activate Task Manager Entry 6
                              activate task manager entry 7=none,Meta+7,Activate Task Manager Entry 7
                              activate task manager entry 8=none,Meta+8,Activate Task Manager Entry 8
                              activate task manager entry 9=none,Meta+9,Activate Task Manager Entry 9
                              manage activities=Meta+Q,Meta+Q,Show Activity Switcher
                              next activity=Meta+Tab,Meta+Tab,Walk through activities
                              previous activity=Meta+Shift+Tab,Meta+Shift+Tab,Walk through activities (Reverse)
                              show dashboard=Ctrl+F12,Ctrl+F12,Show Desktop
                              stop current activity=Meta+S,Meta+S,Stop Current Activity
                              switch to next activity=none,none,Switch to Next Activity
                              switch to previous activity=none,none,Switch to Previous Activity
                              toggle do not disturb=none,none,Toggle do not disturb
                              LOL

                              As well as

                              [lattedock]
                              _k_friendly_name=Latte Dock
                              activate entry 1=Meta+1,Meta+1,Activate Entry 1
                              activate entry 10=,Meta+0,Activate Entry 10
                              activate entry 11=Meta+Z,Meta+Z,Activate Entry 11
                              activate entry 12=Meta+X,Meta+X,Activate Entry 12
                              activate entry 13=Meta+C,Meta+C,Activate Entry 13
                              activate entry 14=Meta+V,Meta+V,Activate Entry 14
                              activate entry 15=Meta+B,Meta+B,Activate Entry 15
                              activate entry 16=Meta+N,Meta+N,Activate Entry 16
                              activate entry 17=Meta+M,Meta+M,Activate Entry 17
                              activate entry 18=Meta+\\,,Meta+\\,,Activate Entry 18
                              activate entry 19=,Meta+.,Activate Entry 19
                              activate entry 2=Meta+2,Meta+2,Activate Entry 2
                              activate entry 3=Meta+3,Meta+3,Activate Entry 3
                              activate entry 4=Meta+4,Meta+4,Activate Entry 4
                              activate entry 5=,Meta+5,Activate Entry 5
                              activate entry 6=,Meta+6,Activate Entry 6
                              activate entry 7=,Meta+7,Activate Entry 7
                              activate entry 8=,Meta+8,Activate Entry 8
                              activate entry 9=,Meta+9,Activate Entry 9
                              clear-history=none,none,Clear Clipboard History
                              clipboard_action=Ctrl+Alt+X,Ctrl+Alt+X,Enable Clipboard Actions
                              cycleNextAction=none,none,Next History Item
                              cyclePrevAction=none,none,Previous History Item
                              edit_clipboard=none,none,Edit Contents…
                              new instance for entry 1=Meta+Ctrl+1,Meta+Ctrl+1,New Instance for Entry 1
                              new instance for entry 10=Meta+Ctrl+0,Meta+Ctrl+0,New Instance for Entry 10
                              new instance for entry 11=Meta+Ctrl+Z,Meta+Ctrl+Z,New Instance for Entry 11
                              new instance for entry 12=Meta+Ctrl+X,Meta+Ctrl+X,New Instance for Entry 12
                              new instance for entry 13=Meta+Ctrl+C,Meta+Ctrl+C,New Instance for Entry 13
                              new instance for entry 14=Meta+Ctrl+V,Meta+Ctrl+V,New Instance for Entry 14
                              new instance for entry 15=Meta+Ctrl+B,Meta+Ctrl+B,New Instance for Entry 15
                              new instance for entry 16=Meta+Ctrl+N,Meta+Ctrl+N,New Instance for Entry 16
                              new instance for entry 17=Meta+Ctrl+M,Meta+Ctrl+M,New Instance for Entry 17
                              new instance for entry 18=Meta+Ctrl+\\,,Meta+Ctrl+\\,,New Instance for Entry 18
                              new instance for entry 19=Meta+Ctrl+.,Meta+Ctrl+.,New Instance for Entry 19
                              new instance for entry 2=Meta+Ctrl+2,Meta+Ctrl+2,New Instance for Entry 2
                              new instance for entry 3=Meta+Ctrl+3,Meta+Ctrl+3,New Instance for Entry 3
                              new instance for entry 4=Meta+Ctrl+4,Meta+Ctrl+4,New Instance for Entry 4
                              new instance for entry 5=Meta+Ctrl+5,Meta+Ctrl+5,New Instance for Entry 5
                              new instance for entry 6=Meta+Ctrl+6,Meta+Ctrl+6,New Instance for Entry 6
                              new instance for entry 7=Meta+Ctrl+7,Meta+Ctrl+7,New Instance for Entry 7
                              new instance for entry 8=Meta+Ctrl+8,Meta+Ctrl+8,New Instance for Entry 8
                              new instance for entry 9=Meta+Ctrl+9,Meta+Ctrl+9,New Instance for Entry 9
                              repeat_action=Ctrl+Alt+R,Ctrl+Alt+R,Manually Invoke Action on Current Clipboard
                              show latte global settings=Meta+W,Meta+W,Show Latte Global Settings
                              show latte view=Meta+`,Meta+`,Show Latte Dock/Panel
                              show view settings=Meta+A,Meta+A,Cycle Through Dock/Panel Settings Windows
                              show-barcode=none,none,Show Barcode…
                              show-on-mouse-pos=,Meta+V,Open Klipper at Mouse Position

                              Editing the file to change the incorrect friendly name to Plasma or something gets changed back to Latte Dock if any of the Latte Dock shortcuts are edited via the gui.

                              Comment

                              Working...
                              X