Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Add key configuragtion

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
coppolino97
Posts: 115
Joined: 2018-06-05 15:23
Location: Italy
Has thanked: 2 times

Add key configuragtion

#1 Post by coppolino97 »

Hi guys,
I need an help to add this configuration my keyboard.
On my keyboard laptop there is not the symbol > and <.
I would add a shortcuts using the "fn" button that there is on my keyboard to type this two symbols.

For example
"fn+z" gets "<"
"fn+x" get ">"

I tried to go to Application, Settings Manager, Keyboard but I I could not do this configuration.

Thanks for your help.
:D
Lenovo T460 | 8Gbyte of RAM | Intel core i5 | SSD 250GB | Debian 12

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: Add key configuragtion

#2 Post by Segfault »


coppolino97
Posts: 115
Joined: 2018-06-05 15:23
Location: Italy
Has thanked: 2 times

Re: Add key configuragtion

#3 Post by coppolino97 »

I tried using Xmodmap, but I did not resolve my problem.

I tried to configure:
nano ~/.Xmodmap

and inside the file I have written:

Code: Select all

 keycode 133 = Win_key 
After I have typed this command:
xmodmap ~/.Xmodmap

But i get errors:

Code: Select all

xmodmap:  /root/.Xmodmap:1:  bad keysym name 'Win_key' in keysym list
xmodmap:  1 error encountered, aborting.

I tried to configure the shortcut in this way:

Code: Select all

Application, Settings, keyboard, Application shortcuts
The problem in this situation is: What is the right way to create a simple file to type the minus and maximum simbols?

Is there another way to solve this problem?
Thanks
Lenovo T460 | 8Gbyte of RAM | Intel core i5 | SSD 250GB | Debian 12

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Add key configuragtion

#4 Post by bw123 »

...
After I have typed this command:
xmodmap ~/.Xmodmap

But i get errors:

Code: Select all

    xmodmap:  /root/.Xmodmap:1:  bad keysym name 'Win_key' in keysym list
...
Well, you would not want to run xmodmap as root. And also I didnot understand why you wanted to map win_key when you originally said you wanted FN+z?

I'm kind of bored, but on my thrid martitni or I would try and figure it out. It surely can't be that hard, for instance in fluxbox it is very easy to configure keys... and you might not have to use xmodmap. What wm are you using?

p.s. what kind of laptop does not have > and < keys?
resigned by AI ChatGPT

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Add key configuragtion

#5 Post by GarryRicketson »

I don't think it is very hard, I have encountered keyboards that sometimes don't have the symbols I need, .. On linux, one should be able to use the (left) ctrl+shift+u at the same time, it should show a u with a line under it, then type the correct hexcode :
https://ascii.cl/

Code: Select all

ctrl-shft-u 3E = > ctrl-shft-u 3C= <
> < @, I don't have on my key board, I used the ctrl+shft+u 40 for the @ symbol as well,..it takes a while, but if one uses certain symbols often, one quickly starts getting it memorized. I am not sure how one would map it to a specific key, though, but that seems silly, because if it is mapped to a existing key, then that key would no longer do what it is expected to do, so then what ?
I'm kind of bored, but on my thrid martitni
I don't need or drink alcohol, but any way, have a 4th one for me, and enjoy.

Another fairly easy solution, if one has a hard time remembering the code, copy paste the symbols you need to a text file, have it handy, and when you need the symbol , copy/paste it to where ever it is needed. (be sure to use a easy to remember file name) and keep it where it is easy to find.
=== edit ===
type the minus and maximum simbols?
I am not sure what the "maximum" symbol is, can not help on that one, but the minus
is: ctrl+shft+u 2D - (all though I do have that key, I used the ctrl+shft 2D, just now to confirm)
==== one last note, ===
No martinis here, but I am sleepy, and when I am sleepy, I dream, and since I dream I am soaring with parrots, I suppose it is best to go lie down, enjoy.... maybe another martini,
is it 5 now or 6, keep going until you lose count, and you will be where I am.

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Add key configuragtion

#6 Post by Bulkley »

I don't know whether this will help. I used to use xmodmap until it stopped doing what I want on my keyboard. Since than I've been using setxkbmap. The two are similar but require slightly different instructions.

coppolino97
Posts: 115
Joined: 2018-06-05 15:23
Location: Italy
Has thanked: 2 times

Re: Add key configuragtion

#7 Post by coppolino97 »

Well, you would not want to run xmodmap as root. And also I didnot understand why you wanted to map win_key when you originally said you wanted FN+z?

I'm kind of bored, but on my thrid martitni or I would try and figure it out. It surely can't be that hard, for instance in fluxbox it is very easy to configure keys... and you might not have to use xmodmap. What wm are you using?

p.s. what kind of laptop does not have > and < keys?

User avatar
bw123

Posts: 3732
Joined: 2011-05-09 06:02
Location: TN_USA

Top
The combination FN+z was the first idea and an example.
I have tried to follow a tutorial on Debian Wiki about this topic and it said to use "xev" on terminal to identify the "keycode".
I use this tool and when I press FN button, xev does not identify it, so I decide to use the Windows Key.
On my keyboard there aren't this two button.

So I need to create a simple configuration to get this two symbols.

Thanks
Lenovo T460 | 8Gbyte of RAM | Intel core i5 | SSD 250GB | Debian 12

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Add key configuragtion

#8 Post by bw123 »

searched this https://duckduckgo.com/html/?q=linux+ke ... +than+less
found an example here https://unix.stackexchange.com/question ... key/369436

I turned Caps_Lock into period or greater_than when shift is pressed.

Code: Select all

$ xmodmap -pke | grep great
keycode  60 = period greater period greater
$ xmodmap -pke | grep -i caps
keycode  66 = Caps_Lock NoSymbol Caps_Lock
$ xmodmap -e 'keycode 66 = period greater period greater'
$ ..>>
$ xmodmap -e 'keycode 66 = Caps_Lock NoSymbol Caps_Lock'
resigned by AI ChatGPT

coppolino97
Posts: 115
Joined: 2018-06-05 15:23
Location: Italy
Has thanked: 2 times

Re: Add key configuragtion

#9 Post by coppolino97 »

Thanks!
Lenovo T460 | 8Gbyte of RAM | Intel core i5 | SSD 250GB | Debian 12

Post Reply