SliTaz SliTaz Forum

You are not logged in.

#1 2015-06-15 21:29:45

Houllad
Member
Registered: 2015-03-13
Posts: 15

xmodmap

Hi, how can I do work: ctrl+alt+aOtherKey

return certains characteres like: #~<> ...

I have already installed xmodmap, please help me.

PS: sorry for my bad english.

Offline

#2 2015-06-17 14:50:11

Ceel
Administrator
Registered: 2011-04-02
Posts: 1,424

Re: xmodmap

Hi Houllad,

Hmm, reading this (source: https://wiki.archlinux.org/index.php/Xmodmap

or https://wiki.archlinux.fr/Xmodmap for french version)

Print the current keymap table formatted into expressions:

[c]

$ xmodmap -pke

[...]

keycode  57 = n N

[...]

[/c]

Each keycode is followed by the keysym it is mapped to. The above example indicates that the keycode 57 is mapped to the lowercase n, while the uppercase N is mapped to keycode 57 plus Shift.

Each keysym column in the table corresponds to a particular combination of modifier keys:

1. Key

2. Shift+Key

3. mode_switch+Key

4. mode_switch+Shift+Key

5. AltGr+Key

6. AltGr+Shift+Key

it does not seem you can define the sequence [Ctrl] + [Alt]...

But maybe you can redefine other keysyms you don't need for programing like é è £ µ...

Let's try:

[*]
print your keymap table,[c]

[/c][c]$ xmodmap -pke[/c]

[*]
find the keycode for [é]; ie [c]keycode  11 = eacute 2 eacute 2 asciitilde oneeighth[/c]

[*]
open a terminal and type (no need to be root)

[c]xmodmap -e "keycode  11 = less 2 eacute 2 asciitilde oneeighth[/c]"

type [é]; you should see < at screen.

[*]
repeat [c]xmodmap -e[/c] command for other symbols; ie:

[c]xmodmap -e "keycode  16 = greater 7 egrave 7 grave seveneighths[/c]"

[*]
and so on...

You can write a script to configure your keyboard for programing and another one to come back to the original configuration.

You can also create a special user (ie programer) with a configuration file /home/programer/.xmodmap.conf

Hope this help. Let me know.

Can you post a picture of your keyboard?

Another interesting link, the man page (fr): http://www.delafond.org/traducmanfr/X11/man1/xmodmap.1x.html

Offline

#3 2015-06-17 18:57:54

Ceel
Administrator
Registered: 2011-04-02
Posts: 1,424

Re: xmodmap

Another way (Thanks Aleksej!). Remember, I told you about this post 3 months ago: http://forum.slitaz.org/topic/display-utf-8-characters-in-sakura-slitaz5rc2#post-35340:

[*]
Search for a key that is duplicated on your keyboard (on mine I have [Ctrl] and [Shift]; I'll use in the following the rigth [Ctrl] as a compose key)

[*]
open a terminal (no need to be root) and type

[c]setxkbmap -layout "fr" -option "compose:rctrl"[/c]

or edit your /etc/X11/xorg.conf.d/40-Keyboard.conf if you want changes permanent.

That's all! :-)

The rules to compose characters you don't have on your keyboard seem to be in the /usr/share/X11/locale/en_US.UTF-8/Compose file (and not /usr/share/X11/locale/iso8859-1/compose as I thought for french locale ??)

ie: to write characters

[*]# press and release the right [Ctrl], then press and release [+] and press [+] again

[*]~ press [Ctrl], then [space] and then [-]

[*]{ press [Ctrl], then [(] and then [-]

[*]| press [Ctrl], then [v] and then [l]

[*][ press [Ctrl], then [(] and then [(]

[*]\ press [Ctrl], then [/] and then [/]

[*]...

Unfortunately there is no rule for < and >. Depending of the number of characters you need, maybe you'll have to mix the 2 methods.

Offline

#4 2015-06-17 23:15:02

Houllad
Member
Registered: 2015-03-13
Posts: 15

Re: xmodmap

thanks for your response

it does not seem you can define the sequence [Ctrl] + [Alt]...

it's exactly my problem.

I have already mapped the keys for programming (<>#{|}[]) on functions keys (F1, F2, etc)

but I wanted to access it like on windows:

CTRL+ALT+" --> #

CTRL+ALT+' --> {

etc.

but I think, it's not possible sad

Offline

#5 2015-06-17 23:29:47

Houllad
Member
Registered: 2015-03-13
Posts: 15

Re: xmodmap

mon cher cell je vois que ce n'est pas la première fois que vous essayez de m'aider, en fait je n'ai pas posté dans le sous-forum francophone quand j'ai vu que le dernier topic là-bas datait de 2 mois, j'ai donc pensé que celui-ci était devenu un "cimetière".

appartenez-vous à l'équipe de développement de Slitaz ?

Offline

#6 2015-06-18 09:52:53

Ceel
Administrator
Registered: 2011-04-02
Posts: 1,424

Re: xmodmap

Hi Houllad,

According to Wikipedia (https://en.wikipedia.org/wiki/AltGr_key#Control_.2B_Alt_as_a_substitute / https://fr.wikipedia.org/wiki/Touche_Alt_Gr) [Ctrl] + [Alt] can be used only with Windows...

Et non, je n'appartiens pas à l'équipe de développement, je suis seulement un utilisateur.

Quant au forum français, c'est vrai qu'il est exceptionnel d'avoir un topic en française. Je pense que la communauté française est relativement réduite, de ce fait la plupart du temps les gens postent en anglais.

Mais ça fait plaisir de voir un topic en français de temps en temps :-)

Offline

#7 2015-06-18 12:18:42

Houllad
Member
Registered: 2015-03-13
Posts: 15

Re: xmodmap

thanks once more !

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.023 seconds, 7 queries executed - Memory usage: 1.54 MiB (Peak: 1.77 MiB) ]