Re: combine key to output char with xmodmap

2015-06-12 Thread Sven Arvidsson
On Fri, 2015-06-12 at 05:09 +0200, Emanuel Berg wrote:
 Petter Adsen pet...@synth.no writes:
 
  A guess:
 
  String 0xe2
 
 Sorry, that outputs the literal string as well.
 
 Ha, what a silly problem...

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

-- 
Cheers,
Sven Arvidsson
http://www.whiz.se
PGP Key ID 6FAB5CD5




signature.asc
Description: This is a digitally signed message part


Re: combine key to output char with xmodmap

2015-06-12 Thread Emanuel Berg
Sven Arvidsson s...@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


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/87zj44j38k@debian.uxu



Re: combine key to output char with xmodmap

2015-06-11 Thread Petter Adsen
On Thu, 11 Jun 2015 00:09:00 +0200
Emanuel Berg embe8...@student.uu.se wrote:

 Sven Arvidsson s...@whiz.se writes:
 
  How can I change this line
  
  xmodmap -e 'keycode 66=0xe2' # rebind key: CAPS (66) - â
  (0xe2)
  
  so that doesn't happen on CAPS alone (66), but
  instead (and only) on M-CAPS (here, M == Alt_L)?
  
  xev tells me M/Alt_L has has keycode 64.
 
  I'm not sure that's possible with xmodmap.
  Maybe try xmacro?
 
 Good idea, but I didn't get it t work.
 
 With this in ~/keys:
 
 Delay 1
 String 0xe2

A guess:

String 0xe2

?

Petter

-- 
I'm ionized
Are you sure?
I'm positive.


pgpgc8CGsj5Ao.pgp
Description: OpenPGP digital signature


Re: combine key to output char with xmodmap

2015-06-11 Thread Emanuel Berg
Petter Adsen pet...@synth.no writes:

 A guess:

   String 0xe2

Sorry, that outputs the literal string as well.

Ha, what a silly problem...

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


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/87y4jpr5am@debian.uxu



Re: combine key to output char with xmodmap

2015-06-10 Thread Sven Arvidsson
On Wed, 2015-06-10 at 03:26 +0200, Emanuel Berg wrote:
 How can I change this line
 
 xmodmap -e 'keycode 66=0xe2' # rebind key: CAPS (66) - â (0xe2)
 
 so that doesn't happen on CAPS alone (66), but instead
 (and only) on M-CAPS (here, M == Alt_L)?
 
 xev tells me M/Alt_L has has keycode 64.

I'm not sure that's possible with xmodmap. Maybe try xmacro?

-- 
Cheers,
Sven Arvidsson
http://www.whiz.se
PGP Key ID 6FAB5CD5




signature.asc
Description: This is a digitally signed message part


Re: combine key to output char with xmodmap

2015-06-10 Thread Emanuel Berg
Sven Arvidsson s...@whiz.se writes:

 How can I change this line
 
 xmodmap -e 'keycode 66=0xe2' # rebind key: CAPS (66) - â (0xe2)
 
 so that doesn't happen on CAPS alone (66), but
 instead (and only) on M-CAPS (here, M == Alt_L)?
 
 xev tells me M/Alt_L has has keycode 64.

 I'm not sure that's possible with xmodmap.
 Maybe try xmacro?

Good idea, but I didn't get it t work.

With this in ~/keys:

Delay 1
String 0xe2

I got the literal chars (0xe2).

With

Delay 1
String â

I get No keycode ... found for char.

I also tried with xdotool(1) like this

xdotool keydown 0xe2; xdotool keyup 0xe2

That actually did work! ... but only as a command from
xterm :( When I tried to assign an xbindkeys(1)
shortcut, for some reason it wouldn't work, not even
with DISPLAY=:0 on both commands and 0xe2 substituted
for 'a'.

Ideas?

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


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/87h9qfb4hv@debian.uxu



combine key to output char with xmodmap

2015-06-09 Thread Emanuel Berg
How can I change this line

xmodmap -e 'keycode 66=0xe2' # rebind key: CAPS (66) - â (0xe2)

so that doesn't happen on CAPS alone (66), but instead
(and only) on M-CAPS (here, M == Alt_L)?

xev tells me M/Alt_L has has keycode 64.

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


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/87eglkica6@debian.uxu