help-gnu-emacs
[Top][All Lists]
Advanced

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

Compare recent-keys to [home], [end], etc?


From: rjdtoday
Subject: Compare recent-keys to [home], [end], etc?
Date: Sat, 4 Aug 2012 20:37:03 -0700 (PDT)
User-agent: G2/1.0

How can I tell whether a key in recent-keys is the [home] key?

I get the key and test it with the following:

    (let ( (lastkey
             (let* ((recent-keys (recent-keys))
                    (keys-length (length recent-keys))
                   )
                   (aref recent-keys (- keys-length (length 
(this-command-keys)) 1))
             )
           )
         )
      (if (= lastkey <how do I designate the [home] key here?> )  ... )
      ...
    )

I've experimented by using the letter A instead of [home], i.e. with (if (= 
lastkey 65) ... ).  That works if lastkey is 'A', but gives the error "Wrong 
type argument" if lastkey is [home], [end], or similar.

Is there something I can use in that "if" statement so that I can compare 
anything in recent-keys to [home]?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]