e751 [Solved] numpad keys as the same non numpad keys - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Desktop Usage > X.Org

X.Org X.Org on FreeBSD installation & configuration.

Reply
 
Thread Tools Display Modes
  #1  
Old October 31st, 2011, 18:40
freethread freethread is offline
Member
 
Join Date: Aug 2009
Location: italy
Posts: 168
Thanks: 25
Thanked 18 Times in 18 Posts
Default numpad keys as the same non numpad keys

Is there a way to use numpad keys as the related non-numpad keys? That is, the ARROWS, PGUP, PGDN, HOME, END, INS, DEL on a desktop keyboard.

My desktop env is Xfce and I prefer stick with it. I know ther's an option in Gnome keyboard that do this trik, but never tested if it really works. In Xorg configuration there is an option
Code:
Option "XkbOption" "numpad:microsoft"
I found it somewhere on the Net and inserted it in xorg.conf, it seem doesn't works.

I installed Xorg without Hal, but some port use it (gnome-mount, Thunar and few others, I'm working for remove it), anyways Xorg doesn't depend on it so the option should works, or perhaps it's wrong typed.

Anyone know if there is a solution? I run in troubles editing text, some habits are hard to die.

Last edited by freethread; November 1st, 2011 at 07:10.
Reply With Quote
  #2  
Old October 31st, 2011, 19:28
ikreos's Avatar
ikreos ikreos is offline
Junior Member
 
Join Date: Mar 2011
Location: Stuck between subatomic particles in quantum space.
Posts: 78
Thanks: 7
Thanked 9 Times in 9 Posts
Default

Is there any reason you can't turn NumLock off?
__________________
"I reject your reality and substitute my own!" -- Adam Savage, Mythbusters
iBlast! I use vi so much I keep wanting to enter commands when I type in a forum!<ESC>:wAGah!
Proud user of the FreeBSD Operating System. http://www.FreeBSD.org/
Reply With Quote
  #3  
Old October 31st, 2011, 20:06
freethread freethread is offline
Member
 
Join Date: Aug 2009
Location: italy
Posts: 168
Thanks: 25
Thanked 18 Times in 18 Posts
Default

Quote:
Originally Posted by ikreos View Post
Is there any reason you can't turn NumLock off?
lol, I don't know how you can see the numlock led on my keyboard, anyways it's turned off.
I will explain the problem in more detail.

For 'cut', 'copy' and 'paste' command I use respectively 'shift+del', 'ctrl+ins', 'shift+ins', I use them from about 25 years, moreover X Windows is not the graphic environment I usually use. The numeric pad always work as cursor movement and not numeric keys (so nuklock is turned off). If you try to type 'ctrl+ins' (INSERT on numpad), nothing happens in Xfce and in more general all X desktop envs. When you type 'shift+ins' (INSERT on numeric pad) a '0' (zero) will be printed. I prefer the 'ctrl-ins', 'shift-ins' and 'shift-del' on numpad behave the same as on the non-numpad 'ins' and 'del'.

The same happens with selection 'shift+(arrows|home|end|pgup|pgdn)' and 'shift+ctrl+(home|end|pgup|pgdn)' in this case I use the 4 arrow keys and it works, but for home, end, pgup, pgdn I use the numpad keys. Anyhow, if there is a solution for one of the key on numpad it works for all.

As an example, some editors like Geany, Eclipse IDE and, if I remember SciTE, that key combinations are configurable.
Reply With Quote
  #4  
Old October 31st, 2011, 22:35
wblock@'s Avatar
wblock@ wblock@ is online now
Moderator
 
Join Date: Sep 2009
Location: Milky Way galaxy
Posts: 7,720
Thanks: 432
Thanked 1,759 Times in 1,457 Posts
Default

This could be due to a keymap setting. On a US keyboard, the numpad keys type cursor movements unless Numlock is on.

In xfce, the Settings/Keyboard control panel will recognize numpad shift-0 as separate from shift-0. Offhand I can't recall how you can send a fake input character in
X, but I'm pretty sure it's possible. There's xkbcomp(1) and a little searching turns up x11/xdotool. (Untested.)
Reply With Quote
  #5  
Old October 31st, 2011, 23:58
ikreos's Avatar
ikreos ikreos is offline
Junior Member
 
Join Date: Mar 2011
Location: Stuck between subatomic particles in quantum space.
Posts: 78
Thanks: 7
Thanked 9 Times in 9 Posts
Default

Quote:
Originally Posted by wblock@ View Post
This could be due to a keymap setting. On a US keyboard, the numpad keys type cursor movements unless Numlock is on.
Hence why I asked. Just thought it might be something you missed. If you use a different keymap, I apologize for the slightly rude(?) post.

Quote:
Originally Posted by freethread View Post
lol, I don't know how you can see the numlock led on my keyboard, anyways it's turned off.
Well I am stuck between subatomic particles in quantum space.
__________________
"I reject your reality and substitute my own!" -- Adam Savage, Mythbusters
iBlast! I use vi so much I keep wanting to enter commands when I type in a forum!<ESC>:wAGah!
Proud user of the FreeBSD Operating System. http://www.FreeBSD.org/

Last edited by ikreos; November 1st, 2011 at 04:05.
Reply With Quote
  #6  
Old November 1st, 2011, 07:03
freethread freethread is offline
Member
 
Join Date: Aug 2009
Location: italy
Posts: 168
Thanks: 25
Thanked 18 Times in 18 Posts
Default

Thanks ikreos and wblock for your advices, after a deep search on the web without success and after many test and Xfce restarts, I found a solution that works for me, perhaps it's not elegant but block a lot of swearwords.

First thing, the line I had in xorg.conf was wrong, this is the right one
Code:
Section "InputDevice"
    Identifier     "Keyboard0"
    ...
    Option         "XkbOptions" "numpad:microsoft"
EndSection
with this line the numpad behave as expected except fot INS and DEL, they do nothing with modifiers (alt, ctrl and shift).To correct this I remapped them to the non-numpad twins insering the following lines in .xinitrc before starting Xfce
Code:
xmodmap -e "keysym KP_Insert = Insert"
xmodmap -e "keysym KP_Delete = Delete"
exec startxfce4
Now I try to set [solved] to this thread
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Fluxbox] Fluxbox keys tutorial teckk Other Window Managers 1 August 25th, 2011 13:40
GELI keys not found bbzz General 6 May 8th, 2011 23:26
[Solved] Multimedia keys serjsk8 Multimedia 3 October 3rd, 2010 23:43
Multimedia Keys CodeBlock Multimedia 25 September 4th, 2010 17:04
Authentication with SSH keys dennylin93 Web & Network Services 3 July 30th, 2009 13:56


All times are GMT +1. The time now is 01:05.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0