[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: combine key to output char with xmodmap



Sven Arvidsson <sa@whiz.se> writes:

> Maybe this combination of xdotools and xbindkeys might
> work?
> http://superuser.com/questions/469004/remap-superarrow-key-to-home-end

Again, 'xdotool key 0xe2' works in xterm but not if
put in .xbindkeysrc and then invoked with the
keystroke. I have xbindkeys up and running and
everything else works, so I don't know why.

Here is the file:

    http://user.it.uu.se/~embe8573/conf/.xbindkeysrc

Anyway, I managed to solve the problem another way!

First I put this in .xinitrc to make CAPS produce the
letter 'a', which I can later handle, contrary to CAPS
(?) when later telling zsh what to do with the char.

    setxkbmap -option caps:none  # disable caps lock
    xmodmap -e 'keycode 66=a'    # rebind CAPS (66)

M-a seems to (in zsh) execute a command while not
removing it (the command, i.e. its text) from the
input line. I can live without that, so I can instead
do:

    bindkey -M main    "\ea" enable-caps-mode

So now, yes, M-CAPS in xterm does enable-caps-mode!

Only, CAPS in X suddenly outputs an "a", but that's
OK. In the Linux VTs and in particular in Emacs I have
that something useful which isn't applicable to
X/xterm, so I won't hit it in X anyway. But the M-CAPS
enabling of caps-mode is consistent, at last...

Thank you both - interestingly, I wouldn't have had
the energy to solve it it without you making
suggestions, even tho they didn't work :) But if you
get it to work with xdotool/xbindkeys pleas tell me,
of course.

--
underground experts united
http://user.it.uu.se/~embe8573


Reply to: