UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have found that the <Enter> key on the numeric keypad does not act the same as the <Enter> key on the main keyboard. Confirming a file copy in Gnome Commander for example. Using xev I found the following
Quote:
Main <Enter>
------------
KeyPress event, serial 36, synthetic NO, window 0x5600002,
root 0x25d, subw 0x5600003, time 44244330, (50,55), root799,113),
state 0x10, keycode 36 (keysym 0xff0d, Return), same_screen YES,
" XLookupString gives 1 bytes: (0d) "
" XmbLookupString gives 1 bytes: (0d) "
XFilterEvent returns: False
So based on some research it seems I should be able to edit my ~/.Xmodmap to assign the same key (Return) to keycode 104 - the keypad <Enter> key.
Except - I have no .Xmodmap. Am I supposed to? Did it move in Ubuntu 9.10? Do I have to create it? or does Ubuntu 9.10 use a "better" method of handling key mappings?
The problem is that the keypad <Enter> does not activate the default button in dialogs. For example if I select a file in one Panel of Gnome Commander and press F5 to copy it to the location in the other panel a copy confirmation dialog comes up. The OK button is highlighted and is the default action. The main keyboard <Enter> will actuate the OK button. The keypad <Enter> will not.
The xev output is shown in the original post. I am not an expert in evaluating the data but is seems that the two keys are different. I will look into xmodmap.
If Ubuntu has a .Xmodmap file it is well hidden - I had started down this road once before but could not find any such file ANYWHERE on the system.
So, as there is supposed to be one in $HOME/ and the format is supposed to match the output of xmodmap -pke I simply redirected the output of the command to create my own .Xmodmap.
I opened my new .Xmodmap file in gedit. Then I looked up the Enter key, keycode 36 and copied the data for that key "Return NoSymbol Return NoSymbol Return" and replaced the data for the keypad return key keycode 104 with the same string. I restarted the PC (guess I could have logged out and back in) anyhow the custom keymappings loaded. I confirmed them in xev and found that Gnome Commander now honors the keypad enter key
Now if only I could get the Gnome "file selector" dialog to respect my "single click performs the action" preference. However, that seems to be related to a bug (or philosophical disagreement) which dates back about 140 years
Now if only I could get the Gnome "file selector" dialog to respect my "single click performs the action" preference. However, that seems to be related to a bug (or philosophical disagreement) which dates back about 140 years
If you mean in the Nautilus file browser, you can alter this with Edit Preferences - Behaviour. In general, you can have a "simulated secondary click", where a slow release counts as a double click: see System - Preferences - Hardware - Mouse - Accessibility.
The Nautilus file browser I have under control. Single click does the deed. Same for Gnome Commander. It is the dialog following Open; File (common to most applications) which does not work. I may try the mouse options although I will have to think what that might do in other situations. Which reminds me of a story...
I was working for a fortune 250 company converting data from a number of in-house applications to an off the shelf work management/supply chain suite of programs. We had a programmer on the team (a little weird - his belief was that if aquarium antibiotics worked for fish they would work for any other animal - even his family and himself) - anyhow the Lovebug worm was making its way around and this dude received a copy of it from some source. He saved it to his PC and right clicked on it with the intention of opening it in Notepad to have a look at the code. Anyhow he managed to trigger it. His PC was known to be a little flaky and often would seemingly substitute a double click for a single click on occasion or a double click for two single clicks a long time apart. Some weeks later, after Mr. Aquarium Antibiotics was fired for threatening another staff member, the PC presented a note on screen from Intel stating that the processor had exceeded its allowed error count and should be replaced under warranty. We did that and it never confused a click vs. a double click again.
My answer to this issue was to create my xmodmap file in /etc/X11/ because I wanted all users to have the edited keys then edit /etc/X11/Xsession and add this line...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.