Make keyboard in Ubuntu 14.04 act like in Windows?
Solution 1
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...").
Solution 2
https://askubuntu.com/questions/57079/xubuntu-make-shiftnumpad-work-like-windows
This answer is via Linux command-line: - edit /etc/default/keyboard - make sure it contains this line
XKBOPTIONS="numpad:microsoft"
Solution 3
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.
Related videos on Youtube
Robert Oschler
Newly minted, avid Windows Phone developer with a passion for natural language processing apps that leverage Azure for a complete, intelligent, mobile client platofrm. Also a devout robotics enthusiast and consumer EEG headset applicaitons developer (Emotiv EPOC headset).
Updated on September 18, 2022Comments
-
Robert Oschler over 1 year
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.
-
Robert Oschler about 8 yearsI 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?
-
theDrake about 8 yearsIt 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. -
Robert Oschler about 8 yearsThank 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.
-
Robert Oschler about 8 yearsAdd a comment tomorrow when you update your answer so I can award you the bounty I posted.
-
theDrake about 8 yearsThanks, Robert! Glad that helped. My answer is now updated.
-
Brōtsyorfuzthrāx about 8 yearsThis doesn't work in Xubuntu (Ubuntu running XFCE), by the way. Is there something like
gnome-tweak-tool
for that? -
theDrake about 8 yearsI haven't tried any of this on Xubuntu, but this thread should be useful.
-
Robert Oschler about 8 years@theDrake - bounty awarded. Thanks again.
-
Robert Oschler about 8 years@theDrake You're most definitely welcome. :)
-
Martin Andersson about 6 yearsI had to restart my computer for this to take effect