13.4. Character Attributes
Prev | Chapter 13. Characters | Next

## 13.4. Character Attributes [sec_13-1-3]

Characters have no implementation-defined or [CLtL1] font and bit attributes. All characters are simple characters.

### 13.4.1. Input Characters

For backward compatibility, there is a class `SYS::INPUT-CHARACTER` representing either a character with font and bits, or a keystroke. The following functions work with objects of types `CHARACTER` and `SYS::INPUT-CHARACTER`. Note that `EQL` or `EQUAL` are equivalent to `EQ` on objects of type `SYS::INPUT-CHARACTER`.

`EXT:CHAR-FONT-LIMIT` = 16
  The system uses only font 0.
`EXT:CHAR-BITS-LIMIT` = 16

  Character bits:

  key | value
  --- | ---
  `:CONTROL` | `EXT:CHAR-CONTROL-BIT`
  `:META` | `EXT:CHAR-META-BIT`
  `:SUPER` | `EXT:CHAR-SUPER-BIT`
  `:HYPER` | `EXT:CHAR-HYPER-BIT`

`(`EXT:CHAR-FONT` `object`)`
  returns the font of a `CHARACTER` or `SYS::INPUT-CHARACTER`.
`(`EXT:CHAR-BITS` `object`)`
  returns the bits of a `CHARACTER` or `SYS::INPUT-CHARACTER`.
`(`EXT:MAKE-CHAR` `char` [`bits` [`font`]])`
  returns a new `SYS::INPUT-CHARACTER`, or `NIL` if such a character cannot be created.
`(`EXT:CHAR-BIT` `object` `name`)`
  returns `T` if the named bit is set in `object`, else `NIL`.
`(`EXT:SET-CHAR-BIT` `object` `name` `new-value`)`
  returns a new `SYS::INPUT-CHARACTER` with the named bit set or unset, depending on the `BOOLEAN` `new-value`.

### Warning

`SYS::INPUT-CHARACTER` is not a subtype of `CHARACTER`.

Platform Dependent: UNIX, Win32 platforms only.
  The system itself uses this `SYS::INPUT-CHARACTER` type only to mention special keys and Control/Alternate/Shift key status on return from `(`READ-CHAR` `EXT:*KEYBOARD-INPUT*`)`.

| These notes document CLISP version 2.45 | Last modified: 2008-05-14

Enter your search termsSubmit search form
Webclisp.cons.orgclisp.podval.orgwww.lisp.org

Prev | Up | Next
13.3. Character Scripts | Home | 13.5. Graphic Characters