[maemo-users] emacs (on remote machines) / osso-xterm / BT keyboard

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

 



Thanks to a post by Lon in the

http://www.internettablettalk.com/forums/showthread.php?t=1085&page=4&pp=10

thread on the internettablettalk forums I could solve my troubles
using the Nokia SU-8W BT keyboard in remote emacs sessions.

On Mon, Jan 23, 2006 at 10:04:39AM +0100, Stefan Boresch wrote:
> 
> However, in emacs no joy: While Ctrl-X Ctrl-C and the like now work,
> many characters do not work or make emacs do weird things. Standard
> (english) letters and numbers work, also some basic characters like *
> or @. But in particular all characters that require Fn - Shift - <key
> press> fail, or send something which emacs interprets completely
> different. I have only experienced things like that ages ago from

If I understand a related thread on the developers list correctly, the 
xim input method, which is activated by a BT keyboard, tries to convert/pack
characters into UTF-8, with mixed success. The key for my problem, however,
is to make emacs aware that all 8bits of the characters sent are
relevant. Interestingly, just doing something like

(let ((value (current-input-mode)))
  ;; The third arg only matters in that it is not t or nil.
  (set-input-mode (nth 0 value) (nth 1 value) 'iso-latin-1 (nth 3 value)))
                                                  ^^^^
                                 this should make emacs interpret 8bit
                                 characters correctly

is *not* enough, but forcing emacs into full utf-8 mode does the trick:
My .emacs on my work machines now contains:

(if (getenv "_NOKIA770")
    (progn (setq locale-coding-system 'utf-8)
           (set-terminal-coding-system 'utf-8)
           (set-keyboard-coding-system 'utf-8)
           (set-selection-coding-system 'utf-8)
           (prefer-coding-system 'utf-8)))

Hope that helps someone else! I still need to add some define-keys,
since the software keyboard for some strange reasons doesn't send <RET>
but <kb-return> (???), but otherwise I am now quite happy ...

Stefan


-- 
Stefan Boresch
Institute for Biomolecular Structural Chemistry
University of Vienna, Waehringerstr. 17       A-1090 Vienna, Austria
Phone: -43-1-427752715                        Fax:   -43-1-427752790




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Big List of Linux Books]    

  Powered by Linux