XUbuntu: Make Shift+NumPad work like Windows

23,174

Solution 1

After some grepping I found the solution: You need to add the numpad:microsoft option to the XkbOptions. On older Ubuntus, do that in your xorg.conf. On newer ones open the file /etc/default/keyboard and change this line:

XKBOPTIONS=""

to

XKBOPTIONS="numpad:microsoft"

Save and reboot (restarting X doesn't seem to work, at least not with RAlt+PrintScreen+K). You may need to run sudo dpkg-reconfigure keyboard-configuration for changes to take effect.

Solution 2

Ubuntu 14.04 have no more "Miscellaneous compatibility options" in the keyboard settings. Editing /etc/default/keyboard also is not a working solution. But dconf database contains the required options with key /org/gnome/desktop/input-sources/xkb-options. This options should be completed with numpad:microsoft to something like ['grp:alt_shift_toggle', 'grp_led:scroll', 'numpad:microsoft'] manually in dconf-editor or using this script:

# !/bin/bash
old=`gsettings get org.gnome.desktop.input-sources xkb-options`
new=`echo $old | sed "s/'numpad:microsoft'//g" | sed -r "s/(, )+/, /g" | sed -r "s/(, )?]/, 'numpad:microsoft']/"`
gsettings set org.gnome.desktop.input-sources xkb-options "$new"

Solution 3

In Xubuntu 16.04 the XKBOPTIONS setting ( XKBOPTIONS="numpad:microsoft" ) in /etc/default/keyboard is ignored - I consider this to be a bug.

I'm using the following command as workaround:
setxkbmap -option 'numpad:microsoft'

In order to run the above command automatically when starting the graphical desktop environment, I've create an Application Autostart entry:
Menu > Settings > Session and Startup > Application Autostart > Add

          Name: Make Shift+NumPad work like MS Windows
Description: whatsoever
   Command:setxkbmap -option 'numpad:microsoft'

Solution 4

Glad I found your post. Using Natty Narwhal, I found a similar option in the Keyboard settings.

  1. Search for Keyboard
  2. Click Layouts tab
  3. Click Options button
  4. Expand miscellaneous compatibility options
  5. Check "Shift with numeric keypad keys works as in MS Windows"
  6. Close and you're good!

Solution 5

For uBuntu 18.04, another options is to use Dconf-Editor, a powerful GUI for most uBuntu settings. If not installed, open Terminal and type:

  • apt-get update
  • apt-get install dconf-editor -y

Open dconf Editor, then /org/gnome/desktop/input-sources/xkb-options.

On a fresh uBuntu installation, Custom value will be blank. Turn Use default value OFF then:

  • insert ['numpad:microsoft'] (if blank) or
  • append , 'numpad:microsoft' (after whatever is there, if not blank)

For example, ['caps:none', 'numpad:microsoft'] which both disables Caps Lock and uses the NumPad as in Windows. Close dconf Editor, no reboot required.

Share:
23,174

Related videos on Youtube

Raphael R.
Author by

Raphael R.

Updated on September 18, 2022

Comments

  • Raphael R.
    Raphael R. over 1 year

    Ok, I've used Ubuntu with GNOME for a while, but now I'm using XUbuntu. In Ubuntu, there used to be a keyboard preference which makes the numpad more sane, it was called something like "Make Shift+NumPad work like Windows".

    The problem this options solves is, that when you press NumPad 7, it acts like the "Home" key, which is all fine, but if you press Shift+NumPad 7, it acts like the "7" key, which is not fine because I'm on a laptop and the regular "Home" key requires me to pull of an anatomically insane move. Anyways, this option made Shift+NumPad 7 act like the "Home" key.

    I can't find that option under XUbuntu. How do I set it?

    Update: GUI or command line, doesn't matter.

  • jocull
    jocull about 11 years
    Thank you! This is the only solution that worked for me - editing /etc/default/keyboard didn't work.
  • f.cipriani
    f.cipriani over 10 years
    That option has been removed in 13.10. It can still be selected by installing gnome-tweak-tool: sudo apt-get install gnome-link-tool. Then you'll find it under "Typing" in the "Miscellaneous compatibility options" list.
  • user2390005
    user2390005 about 10 years
    @f.cipriani I don't know if that was a typo in your comment or if the tool has been renamed, but the current correct name is gnome-tweak-tool.
  • f.cipriani
    f.cipriani about 10 years
    Thanks @waldir, that was a typo, it is actually gnome-tweak-tool
  • peter karasev
    peter karasev almost 9 years
    awesome!! what on earth was someone smoking to remove this... Or, if this feature is some "evil windows thing", how are you supposed to do shift-end on the laptop, when the regular key is in a hard to reach place?
  • Storm
    Storm over 8 years
    Great answer ! Btw instead of using the command line you can also install the dconf-editor in Ubuntu >= 12.04 Check this answer for more details askubuntu.com/questions/22313/…
  • einpoklum
    einpoklum over 8 years
    Can you adapt this answer for a non-root user?
  • Don Branson
    Don Branson about 8 years
    Just used this successfully on Ubuntu 15.10. Thanks!
  • Don Branson
    Don Branson about 8 years
    @einpoklum - you need root.
  • David Parks
    David Parks over 7 years
    Works great, and without restart, thanks! But what do you mean by "Menu > Settings"? From where? I don't think you mean system settings.
  • F.M.
    F.M. over 7 years
    Hi David. I have created 5 screenshots: (1/5) imgur.com/a/h00IQ | (2/5) imgur.com/a/xUcJS | (3/5) imgur.com/a/n9Pq3 | (4/5) imgur.com/a/0m8Df | (5/5) imgur.com/a/rMVdj - hope this helps ;-) .
  • estibordo
    estibordo over 7 years
    No need to reboot (on 16.04). Just need to run sudo dpkg-reconfigure keyboard-configuration.
  • Abhishek Divekar
    Abhishek Divekar over 7 years
    The reboot wasn't required for me. Otherwise, great answer.
  • Konrad Garus
    Konrad Garus about 7 years
    Works like a charm in 16.10. dconf-editor helped too, thanks @Storm!
  • Abhishek Divekar
    Abhishek Divekar about 7 years
    On Elementary OS Loki, this is the only option that seems to work.
  • theDrake
    theDrake about 7 years
    In Linux Mint 18 (Cinnamon), it appears the desired option under "Miscellaneous compatibility options" is "Numlock on: digits, Shift switches to arrow keys, Numlock off: always arrow keys (as in MS Windows)".
  • abjbhat
    abjbhat almost 6 years
    This works on XUbuntu 18.04. No restart needed
  • fool4jesus
    fool4jesus over 5 years
    Yes! This has driven me crazy for so long. Reboot no longer required (hey, the original answer was 2011, it's amazing it's still correct!)
  • Wodzu
    Wodzu almost 5 years
    It worked for me (Ubuntu 18.10), reboot was required.
  • Emad
    Emad almost 5 years
    Confirmed it works in 19 as well. The auto start is not here though. Just add a .sh to /etc/init.d
  • Mike Nakis
    Mike Nakis over 4 years
    I frequent many sites in stackexchange.com and I think I have noticed a disturbing pattern: the sites with the highest percentage of unhelpful answers seem to be the linux sites.
  • nZeus
    nZeus about 4 years
    Works for Ubuntu Budgie 20.04! :+1:
  • PowerKiKi
    PowerKiKi almost 4 years
    It worked for me (Xubuntu 20.04), reboot was required
  • Valentin Grégoire
    Valentin Grégoire over 3 years
    Works like a charm on Ubuntu 20.04 without rebooting and without restarting any applications. I specifically use shift+7 for home and shift+1 for end.
  • mkwithplus
    mkwithplus over 2 years
    @F.M. For some reason doesn't work in Ubuntu 21.10. Maybe you have the understanding?