logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

termkey_interpret_modereport - interpret opaque mode report data

Description

termkey_interpret_modereport()  fills  in  variables  in the passed pointers according to the mode report
       event found in key. It should be called if termkey_getkey(3) or similar have returned a  key  event  with
       the type of TERMKEY_TYPE_MODEREPORT.

       Any pointer may instead be given as NULL to not return that value.

       The  initial  variable  will  be filled with 0 for an ANSI mode report, or '?' for a DEC mode report. The
       mode variable will be filled with the number of the mode, and value will be filled with  the  value  from
       the report.

Name

       termkey_interpret_modereport - interpret opaque mode report data

Return Value

       If  passed a key event of the type TERMKEY_TYPE_MODEREPORT, this function will return TERMKEY_RES_KEY and
       will affect the variables whose pointers were passed in, as described above.

       For other event types it will return TERMKEY_RES_NONE, and its effects on any  variables  whose  pointers
       were passed in, are undefined.

See Also

termkey_waitkey(3), termkey_getkey(3), termkey(7)

                                                                                 TERMKEY_INTERPRET_MODEREPORT(3)

Synopsis

#include<termkey.h>TermKeyResulttermkey_interpret_modereport(TermKey*tk,constTermKeyKey*key,int*initial,int*mode,int*value);

       Link with -ltermkey.

See Also