I have a keyboard (Microsoft Wireless 800) which has an Insert key right beside the Backspace and I keep hitting it by accident and changing the insert mode of whatever I'm typing. I want to disable this key completely as I can think of no circumstance in which it would ever be useful. If it can't be disabled I would consider remapping it to a second Backspace.
Any ideas? I'm using KDE under F21 but I would hope for a general solution to this.
poc
2014-12-18 14:35 GMT+01:00, Patrick O'Callaghan pocallaghan@gmail.com:
I have a keyboard (Microsoft Wireless 800) which has an Insert key right beside the Backspace and I keep hitting it by accident and changing the insert mode of whatever I'm typing. I want to disable this key completely as I can think of no circumstance in which it would ever be useful. If it can't be disabled I would consider remapping it to a second Backspace.
Any ideas? I'm using KDE under F21 but I would hope for a general solution to this.
I would use xmodmap for this:
xmodmap -e "keycode <your_key_code_here> = NoSymbol"
(or something along these lines). You can find out the key code with xev.
Andras
On Thu, 2014-12-18 at 15:54 +0100, Andras Simon wrote:
2014-12-18 14:35 GMT+01:00, Patrick O'Callaghan pocallaghan@gmail.com:
I have a keyboard (Microsoft Wireless 800) which has an Insert key right beside the Backspace and I keep hitting it by accident and changing the insert mode of whatever I'm typing. I want to disable this key completely as I can think of no circumstance in which it would ever be useful. If it can't be disabled I would consider remapping it to a second Backspace.
Any ideas? I'm using KDE under F21 but I would hope for a general solution to this.
I would use xmodmap for this:
xmodmap -e "keycode <your_key_code_here> = NoSymbol"
(or something along these lines). You can find out the key code with xev.
Thanks, I'll try that.
poc
On Thu, 2014-12-18 at 16:27 +0000, Patrick O'Callaghan wrote:
On Thu, 2014-12-18 at 15:54 +0100, Andras Simon wrote:
2014-12-18 14:35 GMT+01:00, Patrick O'Callaghan pocallaghan@gmail.com:
I have a keyboard (Microsoft Wireless 800) which has an Insert key right beside the Backspace and I keep hitting it by accident and changing the insert mode of whatever I'm typing. I want to disable this key completely as I can think of no circumstance in which it would ever be useful. If it can't be disabled I would consider remapping it to a second Backspace.
Any ideas? I'm using KDE under F21 but I would hope for a general solution to this.
I would use xmodmap for this:
xmodmap -e "keycode <your_key_code_here> = NoSymbol"
(or something along these lines). You can find out the key code with xev.
Thanks, I'll try that.
Well it worked on a command line, but not in a browser window. I put it in my .xsession file and logged out and in again, to no avail.
I'll ask again on the KDE list in case it's something KDE-specific.
poc
On 18 Dec 2014 at 16:50, Patrick O'Callaghan wrote:
Subject: Re: Disabling a specific key From: Patrick O'Callaghan pocallaghan@gmail.com To: users@lists.fedoraproject.org Date sent: Thu, 18 Dec 2014 16:50:43 +0000 Send reply to: Community support for Fedora users users@lists.fedoraproject.org mailto:users-request@lists.fedoraproject.org?subject=unsubscribe mailto:users-request@lists.fedoraproject.org?subject=subscribe
On Thu, 2014-12-18 at 16:27 +0000, Patrick O'Callaghan wrote:
On Thu, 2014-12-18 at 15:54 +0100, Andras Simon wrote:
2014-12-18 14:35 GMT+01:00, Patrick O'Callaghan pocallaghan@gmail.com:
I have a keyboard (Microsoft Wireless 800) which has an Insert key right beside the Backspace and I keep hitting it by accident and changing the insert mode of whatever I'm typing. I want to disable this key completely as I can think of no circumstance in which it would ever be useful. If it can't be disabled I would consider remapping it to a second Backspace.
Any ideas? I'm using KDE under F21 but I would hope for a general solution to this.
I would use xmodmap for this:
xmodmap -e "keycode <your_key_code_here> = NoSymbol"
(or something along these lines). You can find out the key code with xev.
Thanks, I'll try that.
Well it worked on a command line, but not in a browser window. I put it in my .xsession file and logged out and in again, to no avail.
I'll ask again on the KDE list in case it's something KDE-specific.
poc
Take a look at /etc/X11/Xmodmap file. Looks like you could add the mapping to that, and it work change how xserver sees the key.
Also, saw mention of the change not affecting the already loaded xserver unless one also does xmodmap /etc/X11/Xmodmap
Some time ago, I had machines with keyboard that had no insert key next to the home key. Double sized DEL key. So I had mapped the menu context button to be INSERT, but its been a while since I played with it.
Something to try.
-- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
+----------------------------------------------------------+ Michael D. Setzer II - Computer Science Instructor Guam Community College Computer Center mailto:mikes@kuentos.guam.net mailto:msetzerii@gmail.com http://www.guam.net/home/mikes Guam - Where America's Day Begins G4L Disk Imaging Project maintainer http://sourceforge.net/projects/g4l/ +----------------------------------------------------------+
http://setiathome.berkeley.edu (Original) Number of Seti Units Returned: 19,471 Processing time: 32 years, 290 days, 12 hours, 58 minutes (Total Hours: 287,489)
BOINC@HOME CREDITS ROSETTA 23352632.085707 | SETI 39269284.523804 ABC 16613838.513356 | EINSTEIN 45539783.101899
On 12/18/2014 11:03 AM, Michael D. Setzer II wrote:
On 18 Dec 2014 at 16:50, Patrick O'Callaghan wrote:
Subject: Re: Disabling a specific key From: Patrick O'Callaghan pocallaghan@gmail.com To: users@lists.fedoraproject.org Date sent: Thu, 18 Dec 2014 16:50:43 +0000 Send reply to: Community support for Fedora users users@lists.fedoraproject.org
mailto:users-request@lists.fedoraproject.org?subject=unsubscribe
mailto:users-request@lists.fedoraproject.org?subject=subscribe
On Thu, 2014-12-18 at 16:27 +0000, Patrick O'Callaghan wrote:
On Thu, 2014-12-18 at 15:54 +0100, Andras Simon wrote:
2014-12-18 14:35 GMT+01:00, Patrick O'Callaghan pocallaghan@gmail.com:
I have a keyboard (Microsoft Wireless 800) which has an Insert key right beside the Backspace and I keep hitting it by accident and changing the insert mode of whatever I'm typing. I want to disable this key completely as I can think of no circumstance in which it would ever be useful. If it can't be disabled I would consider remapping it to a second Backspace.
Any ideas? I'm using KDE under F21 but I would hope for a general solution to this.
I would use xmodmap for this:
xmodmap -e "keycode <your_key_code_here> = NoSymbol"
(or something along these lines). You can find out the key code with xev.
Thanks, I'll try that.
Well it worked on a command line, but not in a browser window. I put it in my .xsession file and logged out and in again, to no avail.
I'll ask again on the KDE list in case it's something KDE-specific.
poc
Take a look at /etc/X11/Xmodmap file. Looks like you could add the mapping to that, and it work change how xserver sees the key.
Also, saw mention of the change not affecting the already loaded xserver unless one also does xmodmap /etc/X11/Xmodmap
Some time ago, I had machines with keyboard that had no insert key next to the home key. Double sized DEL key. So I had mapped the menu context button to be INSERT, but its been a while since I played with it.
Something to try.
Is there a way to alter the key mapping on the main text only console in single user mode?
On Thu, 18 Dec 2014 11:21:23 -0700 jd1008 wrote:
Is there a way to alter the key mapping on the main text only console in single user mode?
rpm -q -i kbd
says: The kbd package contains tools for managing a Linux system's console's behavior, including the keyboard, the screen fonts, the virtual terminals and font files.
But I'm not familiar with any of the tools, so the answer look like "maybe" :-).
2014-12-18 17:50 GMT+01:00, Patrick O'Callaghan pocallaghan@gmail.com:
On Thu, 2014-12-18 at 16:27 +0000, Patrick O'Callaghan wrote:
On Thu, 2014-12-18 at 15:54 +0100, Andras Simon wrote:
2014-12-18 14:35 GMT+01:00, Patrick O'Callaghan pocallaghan@gmail.com:
I have a keyboard (Microsoft Wireless 800) which has an Insert key right beside the Backspace and I keep hitting it by accident and changing the insert mode of whatever I'm typing. I want to disable this key completely as I can think of no circumstance in which it would ever be useful. If it can't be disabled I would consider remapping it to a second Backspace.
Any ideas? I'm using KDE under F21 but I would hope for a general solution to this.
I would use xmodmap for this:
xmodmap -e "keycode <your_key_code_here> = NoSymbol"
(or something along these lines). You can find out the key code with xev.
Thanks, I'll try that.
Well it worked on a command line, but not in a browser window. I put it in my .xsession file and logged out and in again, to no avail.
You mean you ran it in a terminal, and it worked there but not in a browser running beside it? I'm baffled!
But I'm not surprised about the .xsession file. I never know what's run when (I don't really need to, because I don't boot too often and then I can just manually "sh my-xmods").
Andras
On 12/18/2014 10:47 AM, Andras Simon wrote:
You mean you ran it in a terminal, and it worked there but not in a browser running beside it? I'm baffled!
That doesn't sound unreasonable if the browser was opened first. If so, it might be a good idea to run the command in a terminal and then open the browser to see if it makes a difference. Be sure to leave the terminal open until after you see what the browser does, as that may make a difference as well.
On Thu, 2014-12-18 at 11:01 -0800, Joe Zeff wrote:
On 12/18/2014 10:47 AM, Andras Simon wrote:
You mean you ran it in a terminal, and it worked there but not in a browser running beside it? I'm baffled!
That doesn't sound unreasonable if the browser was opened first. If so, it might be a good idea to run the command in a terminal and then open the browser to see if it makes a difference. Be sure to leave the terminal open until after you see what the browser does, as that may make a difference as well.
As I said, I ran the command from the .xsession file which (presumably) runs during the desktop session start, i.e. before anything else. The fact that it had an effect on the terminal (konsole) keyboard but not within the browser is what confuses me.
However there is a further data point: the browser in question is Chrome. When I try it in Firefox, the result is correct. Other input dialogues such as the KDE settings panel, or indeed this instance of Evolution, also work correctly.
IOW it looks like something specific to Chrome.
poc
On 12/18/2014 04:27 PM, Patrick O'Callaghan wrote:
On Thu, 2014-12-18 at 11:01 -0800, Joe Zeff wrote:
On 12/18/2014 10:47 AM, Andras Simon wrote:
You mean you ran it in a terminal, and it worked there but not in a browser running beside it? I'm baffled!
That doesn't sound unreasonable if the browser was opened first. If so, it might be a good idea to run the command in a terminal and then open the browser to see if it makes a difference. Be sure to leave the terminal open until after you see what the browser does, as that may make a difference as well.
As I said, I ran the command from the .xsession file which (presumably) runs during the desktop session start, i.e. before anything else. The fact that it had an effect on the terminal (konsole) keyboard but not within the browser is what confuses me.
However there is a further data point: the browser in question is Chrome. When I try it in Firefox, the result is correct. Other input dialogues such as the KDE settings panel, or indeed this instance of Evolution, also work correctly.
IOW it looks like something specific to Chrome.
poc
If you want this to work in a terminal under the aegis of X server, then you need to do something like:
xmodmap -e "keycode 22 = BackSpace" xmodmap -e "keycode 107 = Delete"
But of course, it depends on what key it is you wish to modify.
Another way is to have translations in your .Xdefaults file, such as
*xterm.Translations: #override\n\ <Key>BackSpace: string(0x08)\n\ <Key>Delete: string(0x7F)\n\ <Key>Home: string("\033[1~")\n\ <Key>End: string("\033[4~") <KeyPress>Prior : scroll-back(1,page)\n\ <KeyPress>Next : scroll-forw(1,page)
again, it depends on what key(s) you wish to modify.
Allegedly, on or about 18 December 2014, Patrick O'Callaghan sent:
I have a keyboard (Microsoft Wireless 800) which has an Insert key right beside the Backspace and I keep hitting it by accident and changing the insert mode of whatever I'm typing. I want to disable this key completely as I can think of no circumstance in which it would ever be useful.
You don't use VI? ;-) The INS key puts you into typing into your file mode, rather than editing it, or doing other functions, with hotkeys.
Some offices resort to ripping out unwanted keys (e.g. power down keys) that get hit by accident. Or slipping hard spaghetti paster under the key cap so it can't be pressed down.
On Fri, 2014-12-19 at 02:02 +1030, Tim wrote:
Allegedly, on or about 18 December 2014, Patrick O'Callaghan sent:
I have a keyboard (Microsoft Wireless 800) which has an Insert key right beside the Backspace and I keep hitting it by accident and changing the insert mode of whatever I'm typing. I want to disable this key completely as I can think of no circumstance in which it would ever be useful.
You don't use VI? ;-) The INS key puts you into typing into your file mode, rather than editing it, or doing other functions, with hotkeys.
I started using VI on dumb terminals, so I'm not used to them thar new-fangled "function keys" of which you speak.
Some offices resort to ripping out unwanted keys (e.g. power down keys) that get hit by accident. Or slipping hard spaghetti paster under the key cap so it can't be pressed down.
Er, not really what I want to do but thanks all the same.
poc
Allegedly, on or about 18 December 2014, Patrick O'Callaghan sent:
keyboard (Microsoft Wireless 800) which has an Insert key right beside the Backspace and I keep hitting it by accident and changing the insert mode
Oh, and another thing... ;-)
Just had a look at a picture of that keyboard, it's very similar to a couple of mine. I can't say that I manage to hit it by accident, but have you considered moving your whole keyboard just a tiny bit to the right, so it's more of a stretch to hit a key in that direction?
On Fri, 2014-12-19 at 02:04 +1030, Tim wrote:
Allegedly, on or about 18 December 2014, Patrick O'Callaghan sent:
keyboard (Microsoft Wireless 800) which has an Insert key right beside the Backspace and I keep hitting it by accident and changing the insert mode
Oh, and another thing... ;-)
Just had a look at a picture of that keyboard, it's very similar to a couple of mine. I can't say that I manage to hit it by accident, but have you considered moving your whole keyboard just a tiny bit to the right, so it's more of a stretch to hit a key in that direction?
I'm sure I would still hit it occasionally. The problem is that I often don't notice until I've overwritten a bunch of characters, so I prefer to put it beyond use.
poc
On Thu, 18 Dec 2014 16:31:49 +0000, Patrick O'Callaghan wrote: [....]
I'm sure I would still hit it occasionally. The problem is that I often don't notice until I've overwritten a bunch of characters, so I prefer to put it beyond use.
Why not simply pry the key cap off?
On 12/18/2014 12:12 PM, Beartooth wrote:
On Thu, 18 Dec 2014 16:31:49 +0000, Patrick O'Callaghan wrote: [....]
I'm sure I would still hit it occasionally. The problem is that I often don't notice until I've overwritten a bunch of characters, so I prefer to put it beyond use.
To the original OP: This is what I do in order to disable a key: sudo /bin/loadkeys << 'EOF' keycode TheKeyCodeInQuestion = NoSymbol EOF
If you do not know the KeyCode, run the program: showkey
and press the key in question and it's code will be displayed. You must wait 10 seconds of idle and showkey program will exit; then run the sudo script above.
On 19/12/14 08:27, jd1008 wrote:
On 12/18/2014 12:12 PM, Beartooth wrote:
On Thu, 18 Dec 2014 16:31:49 +0000, Patrick O'Callaghan wrote: [....]
I'm sure I would still hit it occasionally. The problem is that I often don't notice until I've overwritten a bunch of characters, so I prefer to put it beyond use.
To the original OP: This is what I do in order to disable a key: sudo /bin/loadkeys << 'EOF' keycode TheKeyCodeInQuestion = NoSymbol EOF
If you do not know the KeyCode, run the program: showkey
and press the key in question and it's code will be displayed. You must wait 10 seconds of idle and showkey program will exit; then run the sudo script above.
This looks very useful to me .... but as usual I fall at the first hurdle. When I type showkey or "showkey -k" I get:
Couldn't get a file descriptor referring to the console
And that's it. Anything I can do about this? (Please note: I am running Fedora 17 --- yes, I know --- and using a Mate desktop; Mate 1.6.1 .)
Thanks for any advice.
cheers,
Rolf Turner
On Fri, 19 Dec 2014 10:34:54 +1300 Rolf Turner r.turner@auckland.ac.nz wrote:
On 19/12/14 08:27, jd1008 wrote:
If you do not know the KeyCode, run the program: showkey
and press the key in question and it's code will be displayed. You must wait 10 seconds of idle and showkey program will exit; then run the sudo script above.
This looks very useful to me .... but as usual I fall at the first hurdle. When I type showkey or "showkey -k" I get:
Couldn't get a file descriptor referring to the console
And that's it. Anything I can do about this? (Please note: I am running Fedora 17 --- yes, I know --- and using a Mate desktop; Mate 1.6.1 .)
You need to run showkey in a proper virtual terminal, aka ctrl-alt-f3 or such. It was not designed to work under X.
HTH, :-) Marko
On 12/18/2014 03:55 PM, Marko Vojinovic wrote:
On Fri, 19 Dec 2014 10:34:54 +1300 Rolf Turner r.turner@auckland.ac.nz wrote:
On 19/12/14 08:27, jd1008 wrote:
If you do not know the KeyCode, run the program: showkey
and press the key in question and it's code will be displayed. You must wait 10 seconds of idle and showkey program will exit; then run the sudo script above.
This looks very useful to me .... but as usual I fall at the first hurdle. When I type showkey or "showkey -k" I get:
Couldn't get a file descriptor referring to the console
And that's it. Anything I can do about this? (Please note: I am running Fedora 17 --- yes, I know --- and using a Mate desktop; Mate 1.6.1 .)
You need to run showkey in a proper virtual terminal, aka ctrl-alt-f3 or such. It was not designed to work under X.
HTH, :-) Marko
Correct! I forgot about that. I thought the OP was talking about the console, like /dev/tty...
On 19/12/14 11:55, Marko Vojinovic wrote:
On Fri, 19 Dec 2014 10:34:54 +1300 Rolf Turner r.turner@auckland.ac.nz wrote:
On 19/12/14 08:27, jd1008 wrote:
If you do not know the KeyCode, run the program: showkey
and press the key in question and it's code will be displayed. You must wait 10 seconds of idle and showkey program will exit; then run the sudo script above.
This looks very useful to me .... but as usual I fall at the first hurdle. When I type showkey or "showkey -k" I get:
Couldn't get a file descriptor referring to the console
And that's it. Anything I can do about this? (Please note: I am running Fedora 17 --- yes, I know --- and using a Mate desktop; Mate 1.6.1 .)
You need to run showkey in a proper virtual terminal, aka ctrl-alt-f3 or such. It was not designed to work under X.
HTH, :-)
Did not help, I'm afraid. I did ctrl-alt-f3 and *absolutely nothing* happened.
I (repeatedly) tried using "xev" as was proposed by someone else, to discern the keycode for the key I wished to disable. The output was prolific and profuse and incomprehensible. However after trying *one more time* and scrolling back through the plethora of output I managed to guess that the keycode I needed was "67".
So I did:
xmodmap -e "keycode 67 = NoSymbol"
That was accepted without throwing an error, and blow-me-down, the key in question seemed to be disabled. Success? No, not quite.
I then restarted the system to see if the effect would persist. It didn't!
It would appear that I have to issue the "xmodmap" command every time that I reboot. Not a *big* deal, but annoying. Is there a way to make the effect persist?
I tried put the line
keycode 67 = NoSymbol
into the file /etc/X11/Xmodmap, but that seemed to have no effect.
Any other ideas? Ta.
cheers,
Rolf Turner
On 12/18/2014 05:29 PM, Rolf Turner wrote:
On 19/12/14 11:55, Marko Vojinovic wrote:
On Fri, 19 Dec 2014 10:34:54 +1300 Rolf Turner r.turner@auckland.ac.nz wrote:
On 19/12/14 08:27, jd1008 wrote:
If you do not know the KeyCode, run the program: showkey
and press the key in question and it's code will be displayed. You must wait 10 seconds of idle and showkey program will exit; then run the sudo script above.
This looks very useful to me .... but as usual I fall at the first hurdle. When I type showkey or "showkey -k" I get:
Couldn't get a file descriptor referring to the console
And that's it. Anything I can do about this? (Please note: I am running Fedora 17 --- yes, I know --- and using a Mate desktop; Mate 1.6.1 .)
You need to run showkey in a proper virtual terminal, aka ctrl-alt-f3 or such. It was not designed to work under X.
HTH, :-)
Did not help, I'm afraid. I did ctrl-alt-f3 and *absolutely nothing* happened.
I (repeatedly) tried using "xev" as was proposed by someone else, to discern the keycode for the key I wished to disable. The output was prolific and profuse and incomprehensible. However after trying *one more time* and scrolling back through the plethora of output I managed to guess that the keycode I needed was "67".
So I did:
xmodmap -e "keycode 67 = NoSymbol"
That was accepted without throwing an error, and blow-me-down, the key in question seemed to be disabled. Success? No, not quite.
I then restarted the system to see if the effect would persist. It didn't!
It would appear that I have to issue the "xmodmap" command every time that I reboot. Not a *big* deal, but annoying. Is there a way to make the effect persist?
I tried put the line
keycode 67 = NoSymbol
into the file /etc/X11/Xmodmap, but that seemed to have no effect.
Any other ideas? Ta.
cheers,
Rolf Turner
Rolf, did you see my other replies? You want to do this under the aegis of X server, right?
Please tell me what key you wish to disable, and I will show you how to do it from within a gnome terminal.
Remember, that the modification might not affect the web browser. So, leave the web browser out of this.
On 19/12/14 13:56, jd1008 wrote:
On 12/18/2014 05:29 PM, Rolf Turner wrote:
On 19/12/14 11:55, Marko Vojinovic wrote:
On Fri, 19 Dec 2014 10:34:54 +1300 Rolf Turner r.turner@auckland.ac.nz wrote:
On 19/12/14 08:27, jd1008 wrote:
If you do not know the KeyCode, run the program: showkey
and press the key in question and it's code will be displayed. You must wait 10 seconds of idle and showkey program will exit; then run the sudo script above.
This looks very useful to me .... but as usual I fall at the first hurdle. When I type showkey or "showkey -k" I get:
Couldn't get a file descriptor referring to the console
And that's it. Anything I can do about this? (Please note: I am running Fedora 17 --- yes, I know --- and using a Mate desktop; Mate 1.6.1 .)
You need to run showkey in a proper virtual terminal, aka ctrl-alt-f3 or such. It was not designed to work under X.
HTH, :-)
Did not help, I'm afraid. I did ctrl-alt-f3 and *absolutely nothing* happened.
I (repeatedly) tried using "xev" as was proposed by someone else, to discern the keycode for the key I wished to disable. The output was prolific and profuse and incomprehensible. However after trying *one more time* and scrolling back through the plethora of output I managed to guess that the keycode I needed was "67".
So I did:
xmodmap -e "keycode 67 = NoSymbol"
That was accepted without throwing an error, and blow-me-down, the key in question seemed to be disabled. Success? No, not quite.
I then restarted the system to see if the effect would persist. It didn't!
It would appear that I have to issue the "xmodmap" command every time that I reboot. Not a *big* deal, but annoying. Is there a way to make the effect persist?
I tried put the line
keycode 67 = NoSymbol
into the file /etc/X11/Xmodmap, but that seemed to have no effect.
Any other ideas? Ta.
cheers,
Rolf Turner
Rolf, did you see my other replies?
Well, yes. I've read all the postings in this thread. A lot of what was said I did not understand.
You want to do this under the aegis of X server, right?
I'm not sure, but I don't think so. I just want to disable the key. I am running the Mate desktop under Fedora 17. The "X" (X11?) system is "there" but not paramount, in my limited understanding.
Please tell me what key you wish to disable, and I will show you how to do it from within a gnome terminal.
The key is the "F1" key (function 1) --- labelled most prominently with a question mark: "?". It is next to the ESC key, which I use frequently (being a vi/vim user) and although not all *that* physically proximate, it is close enough so that I often hit it when I reach for the ESC key. (My clumsiness, I guess.) When it is pressed it pops up a Gnome help menu, in which I have no interest.
Remember, that the modification might not affect the web browser. So, leave the web browser out of this.
Gladly!
cheers,
Rolf Turner
P. S. The machine in question is a Toshiba Satellite L850 laptop.
R. T.
On 12/19/2014 03:27 AM, Rolf Turner wrote:
On 19/12/14 13:56, jd1008 wrote:
On 12/18/2014 05:29 PM, Rolf Turner wrote:
On 19/12/14 11:55, Marko Vojinovic wrote:
On Fri, 19 Dec 2014 10:34:54 +1300 Rolf Turner r.turner@auckland.ac.nz wrote:
On 19/12/14 08:27, jd1008 wrote:
If you do not know the KeyCode, run the program: showkey
and press the key in question and it's code will be displayed. You must wait 10 seconds of idle and showkey program will exit; then run the sudo script above.
This looks very useful to me .... but as usual I fall at the first hurdle. When I type showkey or "showkey -k" I get:
Couldn't get a file descriptor referring to the console
And that's it. Anything I can do about this? (Please note: I am running Fedora 17 --- yes, I know --- and using a Mate desktop; Mate 1.6.1 .)
You need to run showkey in a proper virtual terminal, aka ctrl-alt-f3 or such. It was not designed to work under X.
HTH, :-)
Did not help, I'm afraid. I did ctrl-alt-f3 and *absolutely nothing* happened.
I (repeatedly) tried using "xev" as was proposed by someone else, to discern the keycode for the key I wished to disable. The output was prolific and profuse and incomprehensible. However after trying *one more time* and scrolling back through the plethora of output I managed to guess that the keycode I needed was "67".
So I did:
xmodmap -e "keycode 67 = NoSymbol"
That was accepted without throwing an error, and blow-me-down, the key in question seemed to be disabled. Success? No, not quite.
I then restarted the system to see if the effect would persist. It didn't!
It would appear that I have to issue the "xmodmap" command every time that I reboot. Not a *big* deal, but annoying. Is there a way to make the effect persist?
I tried put the line
keycode 67 = NoSymbol
into the file /etc/X11/Xmodmap, but that seemed to have no effect.
Any other ideas? Ta.
cheers,
Rolf Turner
Rolf, did you see my other replies?
Well, yes. I've read all the postings in this thread. A lot of what was said I did not understand.
You want to do this under the aegis of X server, right?
I'm not sure, but I don't think so. I just want to disable the key. I am running the Mate desktop under Fedora 17. The "X" (X11?) system is "there" but not paramount, in my limited understanding.
Please tell me what key you wish to disable, and I will show you how to do it from within a gnome terminal.
The key is the "F1" key (function 1) --- labelled most prominently with a question mark: "?". It is next to the ESC key, which I use frequently (being a vi/vim user) and although not all *that* physically proximate, it is close enough so that I often hit it when I reach for the ESC key. (My clumsiness, I guess.) When it is pressed it pops up a Gnome help menu, in which I have no interest.
Remember, that the modification might not affect the web browser. So, leave the web browser out of this.
Gladly!
cheers,
Rolf Turner
P. S. The machine in question is a Toshiba Satellite L850 laptop.
R. T.
Rolf, I can disable it after I login and X is up and running and I use gnome-terminal . In gnome-terminal click edit-> Preferences -> Shortcuts Under shortcuts, scroll down to the line which shows:
Contents F1
doube-click on F1 and text will appear saying New Accelerator Now press the backspace key and it will be disabled. Click Close.
Now F1 key will be inoperative.
Some apps will not honour the disabled status of that key. Case in point: mate-terminal. But gnome-terminal does honour the disabled state of the key.
On 20/12/14 06:18, jd1008 wrote:
On 12/19/2014 03:27 AM, Rolf Turner wrote:
On 19/12/14 13:56, jd1008 wrote:
On 12/18/2014 05:29 PM, Rolf Turner wrote:
On 19/12/14 11:55, Marko Vojinovic wrote:
On Fri, 19 Dec 2014 10:34:54 +1300 Rolf Turner r.turner@auckland.ac.nz wrote:
On 19/12/14 08:27, jd1008 wrote: > > If you do not know the KeyCode, run the program: > showkey > > and press the key in question > and it's code will be displayed. > You must wait 10 seconds of idle > and showkey program will exit; > then run the sudo script above. >
This looks very useful to me .... but as usual I fall at the first hurdle. When I type showkey or "showkey -k" I get:
> Couldn't get a file descriptor referring to the console
And that's it. Anything I can do about this? (Please note: I am running Fedora 17 --- yes, I know --- and using a Mate desktop; Mate 1.6.1 .)
You need to run showkey in a proper virtual terminal, aka ctrl-alt-f3 or such. It was not designed to work under X.
HTH, :-)
Did not help, I'm afraid. I did ctrl-alt-f3 and *absolutely nothing* happened.
I (repeatedly) tried using "xev" as was proposed by someone else, to discern the keycode for the key I wished to disable. The output was prolific and profuse and incomprehensible. However after trying *one more time* and scrolling back through the plethora of output I managed to guess that the keycode I needed was "67".
So I did:
xmodmap -e "keycode 67 = NoSymbol"
That was accepted without throwing an error, and blow-me-down, the key in question seemed to be disabled. Success? No, not quite.
I then restarted the system to see if the effect would persist. It didn't!
It would appear that I have to issue the "xmodmap" command every time that I reboot. Not a *big* deal, but annoying. Is there a way to make the effect persist?
I tried put the line
keycode 67 = NoSymbol
into the file /etc/X11/Xmodmap, but that seemed to have no effect.
Any other ideas? Ta.
cheers,
Rolf Turner
Rolf, did you see my other replies?
Well, yes. I've read all the postings in this thread. A lot of what was said I did not understand.
You want to do this under the aegis of X server, right?
I'm not sure, but I don't think so. I just want to disable the key. I am running the Mate desktop under Fedora 17. The "X" (X11?) system is "there" but not paramount, in my limited understanding.
Please tell me what key you wish to disable, and I will show you how to do it from within a gnome terminal.
The key is the "F1" key (function 1) --- labelled most prominently with a question mark: "?". It is next to the ESC key, which I use frequently (being a vi/vim user) and although not all *that* physically proximate, it is close enough so that I often hit it when I reach for the ESC key. (My clumsiness, I guess.) When it is pressed it pops up a Gnome help menu, in which I have no interest.
Remember, that the modification might not affect the web browser. So, leave the web browser out of this.
Gladly!
cheers,
Rolf Turner
P. S. The machine in question is a Toshiba Satellite L850 laptop.
R. T.
Rolf, I can disable it after I login and X is up and running and I use gnome-terminal . In gnome-terminal click edit-> Preferences -> Shortcuts Under shortcuts, scroll down to the line which shows:
Contents F1
doube-click on F1 and text will appear saying New Accelerator Now press the backspace key and it will be disabled. Click Close.
Now F1 key will be inoperative.
Some apps will not honour the disabled status of that key. Case in point: mate-terminal. But gnome-terminal does honour the disabled state of the key.
Thanks. That seems to do exactly what I want. Has the advantage of being easily reversible; id est I could reactivate that key if ever I wanted to do so (under some set of circumstances which I cannot imagine).
One comment --- this is probably reflective of my ancient version of Fedora, but when I start a gnome terminal and click on "Edit" there is no "Preferences" option on the menu. (There is a "Profile preferences", but that's not what is needed.) There is a "Keyboard shortcuts" option on the top level of the menu, and that *is* what is needed.
Thanks again.
cheers,
Rolf Turner
On 12/19/2014 05:03 PM, Rolf Turner wrote:
On 20/12/14 06:18, jd1008 wrote:
On 12/19/2014 03:27 AM, Rolf Turner wrote:
On 19/12/14 13:56, jd1008 wrote:
On 12/18/2014 05:29 PM, Rolf Turner wrote:
On 19/12/14 11:55, Marko Vojinovic wrote:
On Fri, 19 Dec 2014 10:34:54 +1300 Rolf Turner r.turner@auckland.ac.nz wrote: > On 19/12/14 08:27, jd1008 wrote: >> >> If you do not know the KeyCode, run the program: >> showkey >> >> and press the key in question >> and it's code will be displayed. >> You must wait 10 seconds of idle >> and showkey program will exit; >> then run the sudo script above. >> > > This looks very useful to me .... but as usual I fall at the first > hurdle. When I type showkey or "showkey -k" I get: > >> Couldn't get a file descriptor referring to the console > > And that's it. Anything I can do about this? (Please note: I am > running Fedora 17 --- yes, I know --- and using a Mate desktop; > Mate > 1.6.1 .)
You need to run showkey in a proper virtual terminal, aka ctrl-alt-f3 or such. It was not designed to work under X.
HTH, :-)
Did not help, I'm afraid. I did ctrl-alt-f3 and *absolutely nothing* happened.
I (repeatedly) tried using "xev" as was proposed by someone else, to discern the keycode for the key I wished to disable. The output was prolific and profuse and incomprehensible. However after trying *one more time* and scrolling back through the plethora of output I managed to guess that the keycode I needed was "67".
So I did:
xmodmap -e "keycode 67 = NoSymbol"
That was accepted without throwing an error, and blow-me-down, the key in question seemed to be disabled. Success? No, not quite.
I then restarted the system to see if the effect would persist. It didn't!
It would appear that I have to issue the "xmodmap" command every time that I reboot. Not a *big* deal, but annoying. Is there a way to make the effect persist?
I tried put the line
keycode 67 = NoSymbol
into the file /etc/X11/Xmodmap, but that seemed to have no effect.
Any other ideas? Ta.
cheers,
Rolf Turner
Rolf, did you see my other replies?
Well, yes. I've read all the postings in this thread. A lot of what was said I did not understand.
You want to do this under the aegis of X server, right?
I'm not sure, but I don't think so. I just want to disable the key. I am running the Mate desktop under Fedora 17. The "X" (X11?) system is "there" but not paramount, in my limited understanding.
Please tell me what key you wish to disable, and I will show you how to do it from within a gnome terminal.
The key is the "F1" key (function 1) --- labelled most prominently with a question mark: "?". It is next to the ESC key, which I use frequently (being a vi/vim user) and although not all *that* physically proximate, it is close enough so that I often hit it when I reach for the ESC key. (My clumsiness, I guess.) When it is pressed it pops up a Gnome help menu, in which I have no interest.
Remember, that the modification might not affect the web browser. So, leave the web browser out of this.
Gladly!
cheers,
Rolf Turner
P. S. The machine in question is a Toshiba Satellite L850 laptop.
R. T.
Rolf, I can disable it after I login and X is up and running and I use gnome-terminal . In gnome-terminal click edit-> Preferences -> Shortcuts Under shortcuts, scroll down to the line which shows:
Contents F1
doube-click on F1 and text will appear saying New Accelerator Now press the backspace key and it will be disabled. Click Close.
Now F1 key will be inoperative.
Some apps will not honour the disabled status of that key. Case in point: mate-terminal. But gnome-terminal does honour the disabled state of the key.
Thanks. That seems to do exactly what I want. Has the advantage of being easily reversible; id est I could reactivate that key if ever I wanted to do so (under some set of circumstances which I cannot imagine).
One comment --- this is probably reflective of my ancient version of Fedora, but when I start a gnome terminal and click on "Edit" there is no "Preferences" option on the menu. (There is a "Profile preferences", but that's not what is needed.) There is a "Keyboard shortcuts" option on the top level of the menu, and that *is* what is needed.
Thanks again.
cheers,
Rolf Turner
Yes, the old version of Fedora's gnome-terminal has slightly different menus. Glad it helped.
Cheers,
JD
On 12/18/2014 02:34 PM, Rolf Turner wrote:
On 19/12/14 08:27, jd1008 wrote:
On 12/18/2014 12:12 PM, Beartooth wrote:
On Thu, 18 Dec 2014 16:31:49 +0000, Patrick O'Callaghan wrote: [....]
I'm sure I would still hit it occasionally. The problem is that I often don't notice until I've overwritten a bunch of characters, so I prefer to put it beyond use.
To the original OP: This is what I do in order to disable a key: sudo /bin/loadkeys << 'EOF' keycode TheKeyCodeInQuestion = NoSymbol EOF
If you do not know the KeyCode, run the program: showkey
and press the key in question and it's code will be displayed. You must wait 10 seconds of idle and showkey program will exit; then run the sudo script above.
This looks very useful to me .... but as usual I fall at the first hurdle. When I type showkey or "showkey -k" I get:
Couldn't get a file descriptor referring to the console
And that's it. Anything I can do about this? (Please note: I am running Fedora 17 --- yes, I know --- and using a Mate desktop; Mate 1.6.1 .)
Thanks for any advice.
cheers,
Rolf Turner
Did you use sudo ???
Try first to su to root and then
/bin/loadkeys << 'EOF' keycode TheKeyCodeInQuestion = NoSymbol EOF
On Thu, 2014-12-18 at 12:27 -0700, jd1008 wrote:
On 12/18/2014 12:12 PM, Beartooth wrote:
On Thu, 18 Dec 2014 16:31:49 +0000, Patrick O'Callaghan wrote: [....]
I'm sure I would still hit it occasionally. The problem is that I often don't notice until I've overwritten a bunch of characters, so I prefer to put it beyond use.
To the original OP: This is what I do in order to disable a key: sudo /bin/loadkeys << 'EOF' keycode TheKeyCodeInQuestion = NoSymbol EOF
If you do not know the KeyCode, run the program: showkey
and press the key in question and it's code will be displayed. You must wait 10 seconds of idle and showkey program will exit; then run the sudo script above.
I already did the equivalent of all that using xmodmap and xev. See earlier posts. Furthermore, the request was for a way to do it for all input from the keyboard, not just a specific terminal session.
Thanks all the same.
poc
On 12/18/2014 04:29 PM, Patrick O'Callaghan wrote:
On Thu, 2014-12-18 at 12:27 -0700, jd1008 wrote:
On 12/18/2014 12:12 PM, Beartooth wrote:
On Thu, 18 Dec 2014 16:31:49 +0000, Patrick O'Callaghan wrote: [....]
I'm sure I would still hit it occasionally. The problem is that I often don't notice until I've overwritten a bunch of characters, so I prefer to put it beyond use.
To the original OP: This is what I do in order to disable a key: sudo /bin/loadkeys << 'EOF' keycode TheKeyCodeInQuestion = NoSymbol EOF
If you do not know the KeyCode, run the program: showkey
and press the key in question and it's code will be displayed. You must wait 10 seconds of idle and showkey program will exit; then run the sudo script above.
I already did the equivalent of all that using xmodmap and xev. See earlier posts. Furthermore, the request was for a way to do it for all input from the keyboard, not just a specific terminal session.
Thanks all the same.
poc
I do not believe you can do it for all input from the KB because the KB is somewhat virtualized under , whereas keyboard of /dev/tty is still under the control of the keymaps, which is modifiable via loadkeys.
I already posted another reply with .Xdefaults translations for X managed terminals.
On Thu, 2014-12-18 at 17:11 -0700, jd1008 wrote:
I already did the equivalent of all that using xmodmap and xev. See earlier posts. Furthermore, the request was for a way to do it for
all
input from the keyboard, not just a specific terminal session.
Thanks all the same.
poc
I do not believe you can do it for all input from the KB because the KB is somewhat virtualized under , whereas keyboard of /dev/tty is still under the control of the keymaps, which is modifiable via loadkeys.
I already posted another reply with .Xdefaults translations for X managed terminals.
As I said in another reply, the .xsession method is working for everything I've tried except Chrome. I also note that alternate consoles don't seem to pay attention to the Insert key at Shell level so that's a non-issue (though they do within Vi).
poc
On 19 December 2014 at 01:29, Patrick O'Callaghan pocallaghan@gmail.com wrote:
On Thu, 2014-12-18 at 12:27 -0700, jd1008 wrote:
On 12/18/2014 12:12 PM, Beartooth wrote:
On Thu, 18 Dec 2014 16:31:49 +0000, Patrick O'Callaghan wrote: [....]
I'm sure I would still hit it occasionally. The problem is that I often don't notice until I've overwritten a bunch of characters, so I prefer to put it beyond use.
To the original OP: This is what I do in order to disable a key: sudo /bin/loadkeys << 'EOF' keycode TheKeyCodeInQuestion = NoSymbol EOF
If you do not know the KeyCode, run the program: showkey
and press the key in question and it's code will be displayed. You must wait 10 seconds of idle and showkey program will exit; then run the sudo script above.
I already did the equivalent of all that using xmodmap and xev. See earlier posts. Furthermore, the request was for a way to do it for all input from the keyboard, not just a specific terminal session.
Thanks all the same.
poc
You can do that using the udev hwdb by remapping the key scan codes.
- Use evtest as root to find out which input device the keyboard is.
- Using evtest, find out the hex scan code of the "insert" key, for example on my system: Event: time 1418977628.734851, -------------- SYN_REPORT ------------ Event: time 1418977631.694868, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70049 Event: time 1418977631.694868, type 1 (EV_KEY), code 110 (KEY_INSERT), value 1 Event: time 1418977631.694868, -------------- SYN_REPORT ------------ Event: time 1418977631.774858, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70049 Event: time 1418977631.774858, type 1 (EV_KEY), code 110 (KEY_INSERT), value 0 Event: time 1418977631.774858, -------------- SYN_REPORT ------------
in this case the hex scan code is 70049 .
- Use udevadm to get the vendor ID and the model ID for that keyboard: udevadm info /dev/input/eventXX
where XX is the value you used/get from evtest above, note down the ID_VENDOR_ID and the ID_MODEL_ID values for that keyboard
- Create /etc/udev/hwdb.d/70-keyboard.hwdb and put this in it: keyboard:usb:v<ID_VENDOR_ID>p<ID_MODEL_ID>* KEYBOARD_KEY_<hex scan code>=backspace
replace <ID_VENDOR_ID> with the actual value of ID_VENDOR_ID... etc. Note that the file is syntax sensitive so you need a space at the beginning of the KEYBOARD_KEY_ line
- As root: udevadm hwdb --update
finally unplug/re-plug the keyboard.
Have a look at /usr/lib/udev/hwdb.d/60-keyboard.hwdb for more info.
On Fri, 2014-12-19 at 10:39 +0200, Ahmad Samir wrote:
On 19 December 2014 at 01:29, Patrick O'Callaghan pocallaghan@gmail.com wrote:
On Thu, 2014-12-18 at 12:27 -0700, jd1008 wrote:
On 12/18/2014 12:12 PM, Beartooth wrote:
On Thu, 18 Dec 2014 16:31:49 +0000, Patrick O'Callaghan wrote: [....]
I'm sure I would still hit it occasionally. The problem is that I often don't notice until I've overwritten a bunch of characters, so I prefer to put it beyond use.
To the original OP: This is what I do in order to disable a key: sudo /bin/loadkeys << 'EOF' keycode TheKeyCodeInQuestion = NoSymbol EOF
If you do not know the KeyCode, run the program: showkey
and press the key in question and it's code will be displayed. You must wait 10 seconds of idle and showkey program will exit; then run the sudo script above.
I already did the equivalent of all that using xmodmap and xev. See earlier posts. Furthermore, the request was for a way to do it for all input from the keyboard, not just a specific terminal session.
Thanks all the same.
poc
You can do that using the udev hwdb by remapping the key scan codes.
Use evtest as root to find out which input device the keyboard is.
Using evtest, find out the hex scan code of the "insert" key, for
example on my system: Event: time 1418977628.734851, -------------- SYN_REPORT ------------ Event: time 1418977631.694868, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70049 Event: time 1418977631.694868, type 1 (EV_KEY), code 110 (KEY_INSERT), value 1 Event: time 1418977631.694868, -------------- SYN_REPORT ------------ Event: time 1418977631.774858, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70049 Event: time 1418977631.774858, type 1 (EV_KEY), code 110 (KEY_INSERT), value 0 Event: time 1418977631.774858, -------------- SYN_REPORT ------------
in this case the hex scan code is 70049 .
- Use udevadm to get the vendor ID and the model ID for that keyboard:
udevadm info /dev/input/eventXX
where XX is the value you used/get from evtest above, note down the ID_VENDOR_ID and the ID_MODEL_ID values for that keyboard
- Create /etc/udev/hwdb.d/70-keyboard.hwdb and put this in it:
keyboard:usb:v<ID_VENDOR_ID>p<ID_MODEL_ID>* KEYBOARD_KEY_<hex scan code>=backspace
replace <ID_VENDOR_ID> with the actual value of ID_VENDOR_ID... etc. Note that the file is syntax sensitive so you need a space at the beginning of the KEYBOARD_KEY_ line
- As root:
udevadm hwdb --update
finally unplug/re-plug the keyboard.
Have a look at /usr/lib/udev/hwdb.d/60-keyboard.hwdb for more info.
Thanks for the detailed reply. I'll consider trying that.
poc