Announcement

Collapse
No announcement yet.

Khotkeys

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Khotkeys

    If you haven't already looked at my other thread (Shortcuts and Gestures), I am trying to assign some hotkeys on my keyboard. The hotkeys are Home Page, Launch Mail, and Tools. However, I can't get the hotkeys to work. I have tried the following the methods:

    Method A:
    1. Click on present Action.
    2. Click on Edit and select New > Global Shortcut > Send Keyboard Input.
    3. Put down 7 under the Present Action Category.
    4. Fill out the comment section.
    5. Select the Trigger shortcut (Home Page key).
    6. Click Apply and Ok.
    Method B:
    1. Click on present Action.
    2. Click on Edit and select New > Global Shortcut > Command/URL.
    3. Put down 7 under the Present Action Category.
    4. Fill out the comment section.
    5. Select the Trigger shortcut (Home Page key).
    6. Put 7 under Action > Command/URL:
    7. Click Apply and Ok.

    Is this not the correct method of doing this? If not, then how do I go about doing it please?

    #2
    what exactly are you trying to have happen ?
    the default home page short cut is alt+home it works in dolphin and firefox that I have checked so far ........that is to say that if in firefox and on some page pressing alt+home will take you to whatever you have firefox's home page set to ,,,,,,same with dolphin .
    so what is it you want to happen when you do your short cut and under what circumstance.

    VINNY
    i7 4core HT 8MB L3 2.9GHz
    16GB RAM
    Nvidia GTX 860M 4GB RAM 1152 cuda cores

    Comment


      #3
      Home page is actually the name of one of the hotkeys on my keyboard. I am trying to assign 7 to it, so when I hit the hotkey it will respond like if I am pressing the 7 key.

      Comment


        #4
        Does this help?

        http://www.osec.ro/en/index.php?titl...eys_in_kubuntu
        --
        Intocabile

        Comment


          #5
          Originally posted by Spadge View Post
          I guess but I thought it would be more simple just using Khotkeys? Doesn't it do the same thing?

          Comment


            #6
            Originally posted by TurtleKing View Post
            I guess but I thought it would be more simple just using Khotkeys? Doesn't it do the same thing?
            I think there is a difference between a hotkey and a remapped key.

            But if hotkeys works for you, use that.
            --
            Intocabile

            Comment


              #7
              Originally posted by Spadge View Post
              I think there is a difference between a hotkey and a remapped key.

              But if hotkeys works for you, use that.
              Well, can you explain to me how the Khotkey work? The remapping one seems a little too advanced for me (I've had bad experiences with scripts in the past).

              Comment


                #8
                hotkeys involve assigning a command or action to a combination of keystrokes- alt-f2 to bring up Krunner, shortcuts to switch desktops, etc.

                Remapping is taking one key and making it act as another key - which is what you are trying to do.

                Comment


                  #9
                  And I believe the 'key' here (no pun intended), is that 'hot keys' require at least two keystrokes -- you cannot have a hot key consisting of just one key stroke. That is what key remapping is for.
                  Windows no longer obstructs my view.
                  Using Kubuntu Linux since March 23, 2007.
                  "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                  Comment


                    #10
                    Are the keys in question currently putting out anything? I ask because sometimes the additional keys are implemented in non-standard ways (usually relying on a windows driver to work) and may not be read by X without help.

                    If they are currently being read, then xmodmap can easily re-map the keys. If not, there's more work involved. To test them if necessary, install and run "xev" from a terminal and push the keys in question and observe the output or lack there of.

                    Please Read Me

                    Comment


                      #11
                      Yes, the keys work. They are read as their default function in Windows (Home Page, Launch Mail, and Tools). Can someone do the remapping (aside from where to save it of course) for me? I a little scared of scripting ever since I accidentally locked my desktop (back in those days I had a dial up connection which was a pain in the arse to reinstall Ubuntu).

                      Comment


                        #12
                        Just because windows reads them doesn't necessarily mean Xorg will by default. As I said before - windows uses drivers for things like multimedia keyboards and with linux you have to rely on the xorg programmers. Not all keyboards are 100 supported out of the box by default. No matter, since it's linux you can easily re-program your keyboard. No scripting required.

                        Verify this file exists: /etc/X11/Xsession.d/80kubuntu-xmodmap

                        Open a terminal (konsole) and do these things:
                        Install x11-utils with this command:

                        sudo apt-get install x11-utils

                        Discover the keycode for the keys you want to remap (both target and source keys) using xev and note each one:

                        xev

                        Then type each code and observe the output. In this example I used the "7" key:

                        KeyPress event, serial 40, synthetic NO, window 0x4a00001,
                        root 0x25a, subw 0x4a00002, time 611098512, (49,31), root51,54),
                        state 0x0, keycode 16 (keysym 0x37, 7), same_screen YES,
                        XLookupString gives 1 bytes: (37) "7"
                        XmbLookupString gives 1 bytes: (37) "7"
                        XFilterEvent returns: False

                        I put the keycode in bold. When you launch xev, a white box will appear on the screen. This indicates xev is running. When you're done, close this box. You will get more than one paragraph like the above for each keypress, but the important part is the keycode. Write these down for each key you want to change and for each key you want to replace them with. In other words, to make the Home key = 7, get the keycodes for the 7 key and the Home key. If you get no response from xev when you press a key - it's not being read. This is also fixable but takes a bit more work.


                        View your current keymap to discover the mapping for these keycodes using xmodmap.

                        xmodmap -pke

                        This will print a list of all current keycodes. Locate each of your keycodes and note what they say. I will use Home (keycode 110) and 7 (keycode 16) keys for my example. Here is their keycode output:

                        keycode 16 = 7 ampersand 7 ampersand
                        keycode 110 = Home NoSymbol Home


                        Then create a hidden file in your home called Xmodmap. To do this, type:

                        kate ~/.Xmodmap

                        Then for each keycode you want to replace, enter a line that defines the new key output (There may be a file that already exists so kate will display it's current information. No matter, all the lines will be remarked out with a preceding ! so xmodmap doesn't read them). For my example, I will re-program the Home key to act as the 7 key:

                        keycode 110 = 7 ampersand 7 ampersand

                        When you're all done, leave a blank line at the end of the file, save the file and close kate.
                        You can start using your new keycodes right away by entering:

                        xmodmap ~/.Xmodmap

                        If everything is as you wanted, you're all done so close the terminal.

                        From now on, when you log in the new keycodes will automatically take effect.

                        Additional fun info:

                        Each key can have six entries using key modifiers. They are in order:

                        Key Shift+Key mode_switch+Key mode_switch+Shift+Key AltGr+Key AltGr+Shift+Key
                        In the above example the Home key does nothing when pressed with Shift. One could leave Home alone but add function to it using shift by replace NoSymbol with 7, like so:

                        keycode 110 = Home 7 Home

                        or reversing this to have the Home key act as 7 and Shift+Home act as Home

                        keycode 110 = 7 Home 7
                        Last edited by Snowhog; Jan 01, 2013, 02:04 PM.

                        Please Read Me

                        Comment


                          #13
                          Thanks oshunluvr the hotkeys are respond how I wanted, and I just learned something new.
                          Enjoy:
                          Click image for larger version

Name:	cookie.jpg
Views:	1
Size:	26.2 KB
ID:	640204

                          Comment


                            #14
                            Thanks for the cookie! Happy new Year!

                            Please Read Me

                            Comment

                            Working...
                            X