6

Is there anyway to create shortcuts for functions like Home, End, Pg Up, Pg Down, etc? I frequently use the aforementioned keys, however those keys are only available when the numpad is disabled - there is no dedicated keys for those function on my laptop. I was thinking of using the Fn key to trigger them even when the numpad is enabled.

Oxwivi
  • 18,499

1 Answers1

5

Approach 1. Using Fn key

  1. Check the keycode of yours key. Run this program at terminal.

    xev
    

    At this example, the terminal shows that the keycode for my k is "45".

  2. Change them as you like creating this file:

    gedit ~/.Xmodmap
    

    It's contents should look like this example:

    keycode 180 = Home End Down
    

    (keycode 180 is for Fn+F3 at my notebook)

    Ilustration:

    (Obs.: if I want to change my k I must use keycode 45 as showed at step "1", if I want to change my Fn+F3 I must use keycode 180).

  3. Log out and log back in or reboot or run this:

    xmodmap ~/.Xmodmap
    

Approach 2. Using a shortcut (combination keys)

  1. Install xdotool

    sudo aptitude install xdotool  
    
  2. Open Gnome Keybindings

    gnome-keybinding-properties  
    
  3. Create the shortcut with this commands:

    xdotool getactivewindow key Home
    xdotool getactivewindow key End
    xdotool getactivewindow key Page_Up
    xdotool getactivewindow key Page_Down
    

    Example:

Enjoy!

David Foerster
  • 36,890
  • 56
  • 97
  • 151
desgua
  • 33,215