Re: FVWM: window-local keymap (almost there!)

From: KONTRA Gergely <kgergely_at_mlabdial.hit.bme.hu>
Date: Mon, 29 Sep 2003 18:08:38 +0200

So, here is my solution.
Shortcomings:
- different keys for different languages
- no "default" keyboard, if the window doesn't have own keymap.
  If you fire up fvwm, and an xterm, change the keymap in the xterm, and
  after that fire up a new xterm, then the keymap won't change back.

*FvwmEvent-LocalKeymap: focus_change RestoreKeymap
Module FvwmEvent FvwmEvent-LocalKeymap

DestroyFunc RestoreKeymap
AddToFunc RestoreKeymap
+ I Piperead "echo SetEnv tmp_keymap $$\\[keymap_$[w.id]\\]"
+ I Echo "Autoswitch to $[tmp_keymap] keyboard layout"
+ I Exec setxkbmap $[tmp_keymap]

DestroyFunc HuKeyboard
AddToFunc HuKeyboard
+ I SetEnv keymap_$[w.id] hu
+ I Exec setxkbmap hu
+ I Echo "Switch to Hungarian keyboard"

AddToFunc UsKeyboard
+ I SetEnv keymap_$[w.id] us
+ I Exec setxkbmap us

Key Shift_L W M HuKeyboard
Key Shift_R W M UsKeyboard
-- 
+-[ Kontra, Gergely<kgergely_at_mcl.hu> PhD student Room IB113 ]---------+
| http://www.mcl.hu/~kgergely            "Olyan langesz vagyok, hogy  |
| Mobil:(+36 20) 356 9656 ICQ: 175564914   poroltoval kellene jarnom" |
+-- Magyar php mirror es magyar php dokumentacio: http://hu.php.net --+
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Mon Sep 29 2003 - 11:11:02 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:55 BST