I am a veteran programmer used to using Windows primarily for coding. I am now doing a lot of coding on Linux using Ubuntu 14.04. I'm really enjoying the distro but the default keyboard behaviour is driving me batty.

In Windows, I use the arrows on the numeric keypad for navigating text. However, when it comes to highlighting while navigating this is where Ubuntu's default keyboard behaviour is unwanted (for me). On Windows, to highlight text for editing purposes I hold the Shift key down while navigating. For example, to highlight one word to the right I press Ctrl + Shift + (Num Keypad) Right Arrow. In Ubuntu, Ctrl + (Num Keypad) Right Arrow moves one word to the right but Ctrl + (Num Keypad) Right Arrow does nothing or prints the "6" character depending on the app.

If I use the mini-keypad (all arrows) then Ctrl + Shift works like in Windows, but not the arrows on the numeric keypad, which is what I want instead. How can I make the numeric keypad in Ubuntu work like it does in Windows? I don't see anything in System | Preferences | Keyboard that seems to help.


For some versions of Ubuntu (as well as Linux Mint), there's a built-in setting for this:

  • Open "Keyboard" preferences via "System Settings."
  • Click the "Options" button.
  • Click on "Miscellaneous keyboard options."
  • Select "Shift with numeric keys works as in MS Windows."

For other versions, including Ubuntu 14.04, that setting isn't available by default, but there's an easy solution:

  • Open a terminal and run sudo apt-get install gnome-tweak-tool.
  • Run gnome-tweak-tool.
  • Click on "Typing."
  • Click on "Miscellaneous compatibility options."
  • Select "Shift with numeric keypad keys works as in MS Windows" (which may only appear as "Shift with numeric keypad ke...").
  • 1
    I don't see an Options button when I click on the Keyboard icon in the System Settings dialog. I see a window titled "Keyboard" that has two tabs labeled "Typing" and "Shortcuts". Neither of those tabs has the option you mention in your answer. Any ideas? Feb 16 '16 at 23:22
  • 1
    It appears that for some versions of Ubuntu (including 14.04) you need to install and run gnome-tweak-tool, click on "Typing," click on "Miscellaneous compatibility options," and then select "Shift with numeric keys works as in MS Windows." Please let me know if that works for you and I'll update my answer accordingly.
    – theDrake
    Feb 17 '16 at 0:09
  • Thank you so much! That worked. A couple of notes for you. 1) I had to install gnome-tweak-tool first "sudo apt-get install gnome-tweak-tool". 2) You can't see the full text in gnome-tweak-tool for the desired option. All you can see in the drop-down list box is "Shift with numeric keypad ke...", but it's the correct option. 3) gnome-tweak-tool has significant problems with the windowing system with underlying windows showing through in some places. But! I don't care. It works. Feb 17 '16 at 0:20
  • Add a comment tomorrow when you update your answer so I can award you the bounty I posted. Feb 17 '16 at 0:23
  • Thanks, Robert! Glad that helped. My answer is now updated.
    – theDrake
    Feb 17 '16 at 1:38


This answer is via Linux command-line: - edit /etc/default/keyboard - make sure it contains this line

  • 1
    I had to restart my computer for this to take effect Feb 27 '18 at 21:18

Since it doesn't look like there is a preference setting for this, you could try remapping the keys yourself using a combination of xbindkeys and xdotool.

It can be tricky sometimes, especially with special key combinations like this, but if you google around a bit you'll find there are lots of examples and it's quite powerful actually. Check out this tutorial for instance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.