Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
TERMKEY_KEYCMP(3)	    Library Functions Manual	       TERMKEY_KEYCMP(3)

NAME
     termkey_keycmp - compare two key events

SYNOPSIS
     #include <termkey.h>

     int termkey_keycmp(TermKey *tk, const TermKeyKey *key1,
		  const TermKeyKey *key2);

     Link with -ltermkey.

DESCRIPTION
     termkey_keycmp()  compares two key structures and applies a total ordering,
     returning a value that is negative, zero, or positive, to indicate  if  the
     given  structures are increasing, identical, or decreasing. Before compari-
     son, copies of both referenced structures are taken, and canonicalised  ac-
     cording to the rules for termkey_canonicalise(3).

     Two   structures	of  differing  type  are  ordered  TERMKEY_TYPE_UNICODE,
     TERMKEY_TYPE_KEYSYM,  TERMKEY_TYPE_FUNCTION,  TERMKEY_TYPE_MOUSE.	 Unicode
     structures  are  ordered  by  codepoint,  keysym  structures are ordered by
     keysym number, function structures are ordered by function key number,  and
     mouse  structures are ordered opaquely by an unspecified but consistent or-
     dering. Within these values, keys different in modifier bits are ordered by
     the modifiers.

RETURN VALUE
     termkey_keycmp() returns an integer greater than, equal to,  or  less  than
     zero to indicate the relation between the two given key structures.

SEE ALSO
     termkey_strpkey(3), termkey_canonicalise(3), termkey(7)

							       TERMKEY_KEYCMP(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=termkey_keycmp&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help