AW: keystrokes to unicode
Hi,
as you noticed, character bits are no longer supported in 7.0, quoting from the release notes:
> Character bits and font attributes (as specified in Common Lisp: the Language (2nd Edition) are no longer supported. char-bits, char-bit, (setf char-bit), char-bits-limit, char-font and char-font-limit have been eliminated from the LISPWORKS package. The syntax for reading characters with bits is now illegal and trying to read such a character (for example #\c-a) will signal an error.
> LispWorks 6.1 and earlier versions also accept some special characters representing keystrokes that do not correspond to Unicode characters, such as #\F1 and #\Home. These are illegal in LispWorks 7.0 and later and will signal an error too.
> Use strings rather than characters to define LispWorks Editor key sequences with modifiers. See Editor bindings for keystrokes with modifiers for examples.
> In other situations when you previously used character bits, you should use Gesture Spec objects (see sys:make-gesture-spec and sys:coerce-to-gesture-spec). The function sys:gesture-spec-to-character will now signal an error if the gesture spec has bits or corresponds to a non-character key like F1, unless the new errorp argument is supplied as nil.
I.e. you are probably going to need to use either strings, as the LispWorks Editor does, or Gesture Specs, or something of your own devising... Unicode doesn't have code points for things like Shift-down, etc. (only things like Control-A, due to legacy support for ASCII).
Regs, Pierre.
--
Pierre R. Mai <pmai@pmsf.de>
PMSF IT Consulting Pierre R. Mai http://www.pmsf.de/
Blumenstr. 4 Goethestr. 32
85417 Marzling 87724 Ottobeuren
Tel. +49(0)8161/976 96 - 11 +49(0)8332/936 69 13
Fax +49(0)8161/976 96 - 51 +49(0)8332/936 69 03
Germany VAT ID / USt-ID Nr: DE 212838159
> -----Ursprüngliche Nachricht-----
> Von: owner-lisp-hug@lispworks.com [mailto:owner-lisp-
> hug@lispworks.com] Im Auftrag von Paul Tarvydas
> Gesendet: Samstag, 12. März 2016 23:27
> An: Lisp Hug Lispworks <lisp-hug@lispworks.com>
> Betreff: keystrokes to unicode
>
>
> Earlier versions of LW (e.g. 5), allowed for characters such as
>
> #\shift-down
> #\shift-left
> #\control-8
>
> LW7 balks at these characters.
>
> I assume that I need to enter such keystrokes as unicode, now.
>
> Is there a way to get LW to let me type the keystrokes and give me back the
> appropriate unicode? I want to enter the characters into a lookup table, an
> editor that fires certain functions based on the keystrokes.
> Or some other tool? (Linux or Mac).
>
> thanks
> pt
>
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html