* tests/testsha1.prg
* tests/longdev.prg
* tests/clsccast.prg
* tests/cmphello.prg
* tests/clsicast.prg
* tests/testop.prg
* tests/clsscast.prg
* tests/objarr.prg
* tests/rddtest/rddmktst.prg
* tests/rddtest/adscl52.prg
* tests/rddtest/adscl53.prg
* tests/rddtest/ntxcl52.prg
* tests/rddtest/ntxcl53.prg
* tests/rddtest/cdxcl52.prg
* tests/rddtest/rddtst.prg
* tests/rddtest/cdxcl53.prg
* tests/transtst.prg
* tests/output.prg
* tests/ac_test2.prg
* tests/clsscope.prg
* tests/dosshell.prg
* tests/sbartest.prg
* tests/speedold.prg
* tests/sdf_test.prg
* tests/wcecon.prg
* tests/debugtst.prg
* tests/testdyn.c
* tests/multiarg.prg
* tests/fornext.prg
* tests/hbinline.prg
* tests/foreach2.prg
* tests/objasign.prg
* tests/scroll.prg
* tests/inherit.prg
* tests/rto_get.prg
* tests/boxtst2.prg
* tests/inkeytst.prg
* tests/overload.prg
* tests/cpinfo.prg
* tests/gtwin.prg
* tests/mt/mttest08.prg
* tests/mt/mttest09.prg
* tests/mt/mttest01.prg
* tests/mt/mttest10.prg
* tests/mt/mttest02.prg
* tests/mt/mttest11.prg
* tests/mt/mttest03.prg
* tests/mt/mttest12.prg
* tests/mt/mttest04.prg
* tests/mt/mttest05.prg
* tests/mt/mttest06.prg
* tests/mt/mttest07.prg
* tests/speedtst.prg
* tests/testsha2.prg
* tests/hsxtest.prg
* tests/arrayidx.prg
* tests/clsnv.prg
* tests/rto_tb.prg
* tests/gtchars.prg
* tests/disptest.prg
* tests/funcarr.prg
* tests/testhtml.prg
* tests/readhrb.prg
* tests/tstcolor.prg
* tests/gtxfnt.prg
* tests/devtest.prg
* tests/aliaslck.prg
* tests/stripem.prg
* tests/dynobj.prg
* tests/tb1.prg
* tests/round.prg
* tests/longstr.prg
* tests/testdyn.prg
* tests/testdyn1.prg
* tests/delimtst.prg
* tests/tstdspac.prg
* tests/version.prg
* tests/setkeys.prg
* tests/gtcolors.prg
* tests/destruct.prg
* tests/seconds.prg
* tests/gtkeys.prg
* tests/usrrdd/exarr.prg
* doc/en/diskspac.txt
* doc/en/string.txt
* doc/en/rdd.txt
* doc/en/hashes.txt
* doc/en/hb_apigt.txt
* doc/en/rddord.txt
* doc/en/hb_api.txt
* doc/en/hb_date.txt
* doc/en/math.txt
* doc/en/hb_vm.txt
* doc/en/treport.txt
* doc/en/terminal.txt
* doc/en/hb_apiln.txt
* doc/en/dir.txt
* doc/en/command.txt
* doc/en/rddmisc.txt
* doc/en/errsys.txt
* doc/en/nation.txt
* doc/en/var.txt
* doc/en/dbstrux.txt
* doc/en/datetime.txt
* doc/en/memo.txt
* doc/en/tgetlist.txt
* doc/en/tlabel.txt
* doc/en/1stread.txt
* doc/en/hb_set.txt
* doc/en/hb_compa.txt
* doc/en/hb_apier.txt
* doc/en/hbinet.txt
* doc/en/hb_macro.txt
* doc/en/array.txt
* doc/en/hb_apiit.txt
* doc/en/rdddb.txt
* doc/en/dbsdf.txt
* doc/en/hvm.txt
* doc/en/input.txt
* doc/en/dbdelim.txt
* doc/en/browse.txt
* doc/en/menu.txt
* doc/en/hb_apird.txt
* doc/en/hb_apifs.txt
* doc/en/file.txt
* doc/en/lang.txt
* doc/en/objfunc.txt
* doc/en/eval.txt
* doc/en/binnum.txt
* doc/en/tclass.txt
* doc/en/misc.txt
* doc/en/set.txt
* doc/en/readme.txt
* doc/man/harbour.1
* doc/man/hbmk2.1
* doc/man/hbpp.1
* doc/man/hbtest.1
* doc/man/hbrun.1
* examples/hbextern/hbextern.prg
* examples/pp/pp.c
* examples/pp/hbpragma.c
* examples/pp/hbppcore.c
* examples/pp/hbppcomp.c
* examples/pp/hbpptbl.c
* examples/pp/hbppdef.h
* examples/superlib/hbsuper.prg
* examples/hbsqlit2/hbsqlit2.ch
* examples/misc/mankala.prg
* examples/misc/guess.prg
* examples/rddado/adordd.prg
* examples/rddado/adordd.ch
* examples/hbapollo/apollo.ch
* examples/hbapollo/apollo.c
* examples/hbapollo/apollo1.prg
* examples/hbdoc2/gentpl.prg
* examples/hbdoc2/gentxt.prg
* examples/hbdoc2/tmplates.prg
* examples/hbdoc2/genxml.prg
* examples/hbdoc2/genhtml.prg
* examples/hbdoc2/hbdoc2.prg
* examples/hbdoc2/hbdoc2.ch
* examples/guestbk/guestbk.prg
* examples/httpsrv/uhttpd.ini
* examples/httpsrv/uhttpd.prg
* examples/httpsrv/cookie.prg
* examples/httpsrv/cgifunc.prg
* examples/httpsrv/session.prg
* examples/terminal/trm_cli.prg
* examples/terminal/terminal.prg
* examples/terminal/trm_srv.prg
* examples/terminal/trm_app.prg
* examples/hbbtree/hb_btree.h
* examples/hbbtree/hb_btree.ch
* examples/hbbtree/hb_btree.c
* examples/hbbtree/tbtree.prg
* examples/hscript/hscript.prg
* examples/hscript/dir.hs
* examples/hscript/multiply.hs
* examples/hscript/ugly.hs
* examples/hscript/hello.hs
* examples/gtwvw/hbole.h
* examples/gtwvw/wvwdraw.c
* examples/gtwvw/wvwmenu.c
* examples/gtwvw/gtwvw.c
* examples/gtwvw/wvwstbar.c
* examples/gtwvw/wvwcheck.c
* examples/gtwvw/wvwfuncs.c
* examples/gtwvw/wvwpush.c
* examples/gtwvw/wvwedit.c
* examples/gtwvw/wvwtbar.c
* examples/gtwvw/hbgtwvw.h
* Deleted 'www.' from harbour-project.org website name.
(www.harbour-project.org -> harbour-project.org)
259 lines
15 KiB
Plaintext
259 lines
15 KiB
Plaintext
/*
|
|
* $Id$
|
|
*/
|
|
|
|
/*
|
|
* Harbour Project source code:
|
|
* demonstration/test code for GT keyboard input
|
|
*
|
|
* Copyright 2007 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
|
|
* www - http://harbour-project.org
|
|
*
|
|
*/
|
|
|
|
|
|
#include "inkey.ch"
|
|
#ifdef __HARBOUR__
|
|
#include "hbgtinfo.ch"
|
|
#endif
|
|
|
|
function main()
|
|
local k, i, s
|
|
local aKeys := { ;
|
|
{ "K_UP", 5, "Up arrow, Ctrl-E" }, ;
|
|
{ "K_DOWN", 24, "Down arrow, Ctrl-X" }, ;
|
|
{ "K_LEFT", 19, "Left arrow, Ctrl-S" }, ;
|
|
{ "K_RIGHT", 4, "Right arrow, Ctrl-D" }, ;
|
|
{ "K_HOME", 1, "Home, Ctrl-A" }, ;
|
|
{ "K_END", 6, "End, Ctrl-F" }, ;
|
|
{ "K_PGUP", 18, "PgUp, Ctrl-R" }, ;
|
|
{ "K_PGDN", 3, "PgDn, Ctrl-C" }, ;
|
|
{ "K_CTRL_UP", 397, "Ctrl-Up arrow" }, ;
|
|
{ "K_CTRL_DOWN", 401, "Ctrl-Down arrow" }, ;
|
|
{ "K_CTRL_LEFT", 26, "Ctrl-Left arrow, Ctrl-Z" }, ;
|
|
{ "K_CTRL_RIGHT", 2, "Ctrl-Right arrow, Ctrl-B" }, ;
|
|
{ "K_CTRL_HOME", 29, "Ctrl-Home, Ctrl-]" }, ;
|
|
{ "K_CTRL_END", 23, "Ctrl-End, Ctrl-W" }, ;
|
|
{ "K_CTRL_PGUP", 31, "Ctrl-PgUp, Ctrl-Hyphen" }, ;
|
|
{ "K_CTRL_PGDN", 30, "Ctrl-PgDn, Ctrl-^" }, ;
|
|
{ "K_ALT_UP", 408, "Alt-Up arrow" }, ;
|
|
{ "K_ALT_DOWN", 416, "Alt-Down arrow" }, ;
|
|
{ "K_ALT_LEFT", 411, "Alt-Left arrow" }, ;
|
|
{ "K_ALT_RIGHT", 413, "Alt-Right arrow" }, ;
|
|
{ "K_ALT_HOME", 407, "Alt-Home" }, ;
|
|
{ "K_ALT_END", 415, "Alt-End" }, ;
|
|
{ "K_ALT_PGUP", 409, "Alt-PgUp" }, ;
|
|
{ "K_ALT_PGDN", 417, "Alt-PgDn" }, ;
|
|
{ "K_ENTER", 13, "Enter, Ctrl-M" }, ;
|
|
{ "K_RETURN", 13, "Return, Ctrl-M" }, ;
|
|
{ "K_SPACE", 32, "Space bar" }, ;
|
|
{ "K_ESC", 27, "Esc, Ctrl-[" }, ;
|
|
{ "K_CTRL_ENTER", 10, "Ctrl-Enter" }, ;
|
|
{ "K_CTRL_RETURN", 10, "Ctrl-Return" }, ;
|
|
{ "K_CTRL_RET", 10, "Ctrl-Return (Compat.)" }, ;
|
|
{ "K_CTRL_PRTSCR", 379, "Ctrl-Print Screen" }, ;
|
|
{ "K_CTRL_QUESTION", 309, "Ctrl-?" }, ;
|
|
{ "K_ALT_ENTER", 284, "Alt-Enter" }, ;
|
|
{ "K_ALT_RETURN", 284, "Alt-Return" }, ;
|
|
{ "K_ALT_EQUALS", 387, "Alt-Equals" }, ;
|
|
{ "K_ALT_ESC", 257, "Alt-Esc" }, ;
|
|
{ "KP_CENTER", 332, "Keypad CENTER (5)" }, ;
|
|
{ "KP_ALT_ENTER", 422, "Keypad Alt-Enter" }, ;
|
|
{ "KP_CTRL_5", 399, "Keypad Ctrl-5" }, ;
|
|
{ "KP_CTRL_SLASH", 405, "Keypad Ctrl-/" }, ;
|
|
{ "KP_CTRL_ASTERISK", 406, "Keypad Ctrl-*" }, ;
|
|
{ "KP_CTRL_MINUS", 398, "Keypad Ctrl--" }, ;
|
|
{ "KP_CTRL_PLUS", 400, "Keypad Ctrl-+" }, ;
|
|
{ "KP_ALT_5", 5, "Keypad Alt-5" }, ;
|
|
{ "KP_ALT_SLASH", 420, "Keypad Alt-/" }, ;
|
|
{ "KP_ALT_ASTERISK", 311, "Keypad Alt-*" }, ;
|
|
{ "KP_ALT_MINUS", 330, "Keypad Alt--" }, ;
|
|
{ "KP_ALT_PLUS", 334, "Keypad Alt-+" }, ;
|
|
{ "K_INS", 22, "Ins, Ctrl-V" }, ;
|
|
{ "K_DEL", 7, "Del, Ctrl-G" }, ;
|
|
{ "K_BS", 8, "Backspace, Ctrl-H" }, ;
|
|
{ "K_TAB", 9, "Tab, Ctrl-I" }, ;
|
|
{ "K_SH_TAB", 271, "Shift-Tab" }, ;
|
|
{ "K_CTRL_INS", 402, "Ctrl-Ins" }, ;
|
|
{ "K_CTRL_DEL", 403, "Ctrl-Del" }, ;
|
|
{ "K_CTRL_BS", 127, "Ctrl-Backspace" }, ;
|
|
{ "K_CTRL_TAB", 404, "Ctrl-Tab" }, ;
|
|
{ "K_ALT_INS", 418, "Alt-Ins" }, ;
|
|
{ "K_ALT_DEL", 419, "Alt-Del" }, ;
|
|
{ "K_ALT_BS", 270, "Alt-Backspace" }, ;
|
|
{ "K_ALT_TAB", 421, "Alt-Tab" }, ;
|
|
{ "K_CTRL_A", 1, "Ctrl-A, Home" }, ;
|
|
{ "K_CTRL_B", 2, "Ctrl-B, Ctrl-Right arrow" }, ;
|
|
{ "K_CTRL_C", 3, "Ctrl-C, PgDn, Ctrl-ScrollLock" }, ;
|
|
{ "K_CTRL_D", 4, "Ctrl-D, Right arrow" }, ;
|
|
{ "K_CTRL_E", 5, "Ctrl-E, Up arrow" }, ;
|
|
{ "K_CTRL_F", 6, "Ctrl-F, End" }, ;
|
|
{ "K_CTRL_G", 7, "Ctrl-G, Del" }, ;
|
|
{ "K_CTRL_H", 8, "Ctrl-H, Backspace" }, ;
|
|
{ "K_CTRL_I", 9, "Ctrl-I, Tab" }, ;
|
|
{ "K_CTRL_J", 10, "Ctrl-J" }, ;
|
|
{ "K_CTRL_K", 11, "Ctrl-K" }, ;
|
|
{ "K_CTRL_L", 12, "Ctrl-L" }, ;
|
|
{ "K_CTRL_M", 13, "Ctrl-M, Return" }, ;
|
|
{ "K_CTRL_N", 14, "Ctrl-N" }, ;
|
|
{ "K_CTRL_O", 15, "Ctrl-O" }, ;
|
|
{ "K_CTRL_P", 16, "Ctrl-P" }, ;
|
|
{ "K_CTRL_Q", 17, "Ctrl-Q" }, ;
|
|
{ "K_CTRL_R", 18, "Ctrl-R, PgUp" }, ;
|
|
{ "K_CTRL_S", 19, "Ctrl-S, Left arrow" }, ;
|
|
{ "K_CTRL_T", 20, "Ctrl-T" }, ;
|
|
{ "K_CTRL_U", 21, "Ctrl-U" }, ;
|
|
{ "K_CTRL_V", 22, "Ctrl-V, Ins" }, ;
|
|
{ "K_CTRL_W", 23, "Ctrl-W, Ctrl-End" }, ;
|
|
{ "K_CTRL_X", 24, "Ctrl-X, Down arrow" }, ;
|
|
{ "K_CTRL_Y", 25, "Ctrl-Y" }, ;
|
|
{ "K_CTRL_Z", 26, "Ctrl-Z, Ctrl-Left arrow" } }
|
|
aadd(aKeys, { "K_ALT_A", 286, "Alt-A" } )
|
|
aadd(aKeys, { "K_ALT_B", 304, "Alt-B" } )
|
|
aadd(aKeys, { "K_ALT_C", 302, "Alt-C" } )
|
|
aadd(aKeys, { "K_ALT_D", 288, "Alt-D" } )
|
|
aadd(aKeys, { "K_ALT_E", 274, "Alt-E" } )
|
|
aadd(aKeys, { "K_ALT_F", 289, "Alt-F" } )
|
|
aadd(aKeys, { "K_ALT_G", 290, "Alt-G" } )
|
|
aadd(aKeys, { "K_ALT_H", 291, "Alt-H" } )
|
|
aadd(aKeys, { "K_ALT_I", 279, "Alt-I" } )
|
|
aadd(aKeys, { "K_ALT_J", 292, "Alt-J" } )
|
|
aadd(aKeys, { "K_ALT_K", 293, "Alt-K" } )
|
|
aadd(aKeys, { "K_ALT_L", 294, "Alt-L" } )
|
|
aadd(aKeys, { "K_ALT_M", 306, "Alt-M" } )
|
|
aadd(aKeys, { "K_ALT_N", 305, "Alt-N" } )
|
|
aadd(aKeys, { "K_ALT_O", 280, "Alt-O" } )
|
|
aadd(aKeys, { "K_ALT_P", 281, "Alt-P" } )
|
|
aadd(aKeys, { "K_ALT_Q", 272, "Alt-Q" } )
|
|
aadd(aKeys, { "K_ALT_R", 275, "Alt-R" } )
|
|
aadd(aKeys, { "K_ALT_S", 287, "Alt-S" } )
|
|
aadd(aKeys, { "K_ALT_T", 276, "Alt-T" } )
|
|
aadd(aKeys, { "K_ALT_U", 278, "Alt-U" } )
|
|
aadd(aKeys, { "K_ALT_V", 303, "Alt-V" } )
|
|
aadd(aKeys, { "K_ALT_W", 273, "Alt-W" } )
|
|
aadd(aKeys, { "K_ALT_X", 301, "Alt-X" } )
|
|
aadd(aKeys, { "K_ALT_Y", 277, "Alt-Y" } )
|
|
aadd(aKeys, { "K_ALT_Z", 300, "Alt-Z" } )
|
|
aadd(aKeys, { "K_ALT_1", 376, "Alt-1" } )
|
|
aadd(aKeys, { "K_ALT_2", 377, "Alt-2" } )
|
|
aadd(aKeys, { "K_ALT_3", 378, "Alt-3" } )
|
|
aadd(aKeys, { "K_ALT_4", 379, "Alt-4" } )
|
|
aadd(aKeys, { "K_ALT_5", 380, "Alt-5" } )
|
|
aadd(aKeys, { "K_ALT_6", 381, "Alt-6" } )
|
|
aadd(aKeys, { "K_ALT_7", 382, "Alt-7" } )
|
|
aadd(aKeys, { "K_ALT_8", 383, "Alt-8" } )
|
|
aadd(aKeys, { "K_ALT_9", 384, "Alt-9" } )
|
|
aadd(aKeys, { "K_ALT_0", 385, "Alt-0" } )
|
|
aadd(aKeys, { "K_F1", 28, "F1, Ctrl-Backslash" } )
|
|
aadd(aKeys, { "K_F2", -1, "F2" } )
|
|
aadd(aKeys, { "K_F3", -2, "F3" } )
|
|
aadd(aKeys, { "K_F4", -3, "F4" } )
|
|
aadd(aKeys, { "K_F5", -4, "F5" } )
|
|
aadd(aKeys, { "K_F6", -5, "F6" } )
|
|
aadd(aKeys, { "K_F7", -6, "F7" } )
|
|
aadd(aKeys, { "K_F8", -7, "F8" } )
|
|
aadd(aKeys, { "K_F9", -8, "F9" } )
|
|
aadd(aKeys, { "K_F10", -9, "F10" } )
|
|
aadd(aKeys, { "K_F11", -40, "F11" } )
|
|
aadd(aKeys, { "K_F12", -41, "F12" } )
|
|
aadd(aKeys, { "K_CTRL_F1", -20, "Ctrl-F1" } )
|
|
aadd(aKeys, { "K_CTRL_F2", -21, "Ctrl-F2" } )
|
|
aadd(aKeys, { "K_CTRL_F3", -22, "Ctrl-F4" } )
|
|
aadd(aKeys, { "K_CTRL_F4", -23, "Ctrl-F3" } )
|
|
aadd(aKeys, { "K_CTRL_F5", -24, "Ctrl-F5" } )
|
|
aadd(aKeys, { "K_CTRL_F6", -25, "Ctrl-F6" } )
|
|
aadd(aKeys, { "K_CTRL_F7", -26, "Ctrl-F7" } )
|
|
aadd(aKeys, { "K_CTRL_F8", -27, "Ctrl-F8" } )
|
|
aadd(aKeys, { "K_CTRL_F9", -28, "Ctrl-F9" } )
|
|
aadd(aKeys, { "K_CTRL_F10", -29, "Ctrl-F10" } )
|
|
aadd(aKeys, { "K_CTRL_F11", -44, "Ctrl-F11" } )
|
|
aadd(aKeys, { "K_CTRL_F12", -45, "Ctrl-F12" } )
|
|
aadd(aKeys, { "K_ALT_F1", -30, "Alt-F1" } )
|
|
aadd(aKeys, { "K_ALT_F2", -31, "Alt-F2" } )
|
|
aadd(aKeys, { "K_ALT_F3", -32, "Alt-F3" } )
|
|
aadd(aKeys, { "K_ALT_F4", -33, "Alt-F4" } )
|
|
aadd(aKeys, { "K_ALT_F5", -34, "Alt-F5" } )
|
|
aadd(aKeys, { "K_ALT_F6", -35, "Alt-F6" } )
|
|
aadd(aKeys, { "K_ALT_F7", -36, "Alt-F7" } )
|
|
aadd(aKeys, { "K_ALT_F8", -37, "Alt-F8" } )
|
|
aadd(aKeys, { "K_ALT_F9", -38, "Alt-F9" } )
|
|
aadd(aKeys, { "K_ALT_F10", -39, "Alt-F10" } )
|
|
aadd(aKeys, { "K_ALT_F11", -46, "Alt-F11" } )
|
|
aadd(aKeys, { "K_ALT_F12", -47, "Alt-F12" } )
|
|
aadd(aKeys, { "K_SH_F1", -10, "Shift-F1" } )
|
|
aadd(aKeys, { "K_SH_F2", -11, "Shift-F2" } )
|
|
aadd(aKeys, { "K_SH_F3", -12, "Shift-F3" } )
|
|
aadd(aKeys, { "K_SH_F4", -13, "Shift-F4" } )
|
|
aadd(aKeys, { "K_SH_F5", -14, "Shift-F5" } )
|
|
aadd(aKeys, { "K_SH_F6", -15, "Shift-F6" } )
|
|
aadd(aKeys, { "K_SH_F7", -16, "Shift-F7" } )
|
|
aadd(aKeys, { "K_SH_F8", -17, "Shift-F8" } )
|
|
aadd(aKeys, { "K_SH_F9", -18, "Shift-F9" } )
|
|
aadd(aKeys, { "K_SH_F10", -19, "Shift-F10" } )
|
|
aadd(aKeys, { "K_SH_F11", -42, "Shift-F11" } )
|
|
aadd(aKeys, { "K_SH_F12", -43, "Shift-F12" } )
|
|
aadd(aKeys, { "K_MOUSEMOVE", 1001, "mouse move" } )
|
|
aadd(aKeys, { "K_LBUTTONDOWN", 1002, "mouse left button down" } )
|
|
aadd(aKeys, { "K_LBUTTONUP", 1003, "mouse left button up" } )
|
|
aadd(aKeys, { "K_RBUTTONDOWN", 1004, "mouse right button down" } )
|
|
aadd(aKeys, { "K_RBUTTONUP", 1005, "mouse right button up" } )
|
|
aadd(aKeys, { "K_LDBLCLK", 1006, "mouse left button double click" } )
|
|
aadd(aKeys, { "K_RDBLCLK", 1007, "mouse right button double click"} )
|
|
aadd(aKeys, { "K_MBUTTONDOWN", 1008, "mouse middle button down" } )
|
|
aadd(aKeys, { "K_MBUTTONUP", 1009, "mouse middle button up" } )
|
|
aadd(aKeys, { "K_MDBLCLK", 1010, "mouse middle button double click" } )
|
|
aadd(aKeys, { "K_MMLEFTDOWN", 1011, "Mouse Move Left Down" } )
|
|
aadd(aKeys, { "K_MMRIGHTDOWN", 1012, "Mouse Move Right Down" } )
|
|
aadd(aKeys, { "K_MMMIDDLEDOWN", 1013, "Mouse Move Middle Down" } )
|
|
aadd(aKeys, { "K_MWFORWARD", 1014, "Mouse Wheel Forward" } )
|
|
aadd(aKeys, { "K_MWBACKWARD", 1015, "Mouse Wheel Backward" } )
|
|
aadd(aKeys, { "K_NCMOUSEMOVE", 1016, "Non-Client Area Mouse Movement" } )
|
|
|
|
? os(), version(), date(), time()
|
|
|
|
mdblclk(250)
|
|
setcancel(.f.)
|
|
//altd(0)
|
|
|
|
#ifdef __HARBOUR__
|
|
set(_SET_EVENTMASK,INKEY_ALL)
|
|
hb_gtInfo(HB_GTI_ESCDELAY,50)
|
|
hb_cdpSelect( "PLMAZ" )
|
|
hb_setTermCP( "PLISO" )
|
|
? hb_gtVersion(1), hb_gtVersion()
|
|
#endif
|
|
|
|
? "@ - interrupt, keycodes checking: "
|
|
?
|
|
while (.t.)
|
|
k:=inkey(0,INKEY_ALL)
|
|
if (i:=ascan(aKeys, { |x| x[2]==k }))!=0
|
|
? " key:"+str(aKeys[i,2],7)+" "+padr(aKeys[i,1],18)+aKeys[i,3]
|
|
elseif k>=32 .and. k<=126 .or. (k>=160 .and. k<=255) .or. IsAlpha(chr(k))
|
|
? "char:"+str(k,7)+" "+chr(k)
|
|
else
|
|
? " key:"+str(k,7)
|
|
endif
|
|
// ?? " ("+ltrim(str(maxrow()))+":"+ltrim(str(maxcol()))+")"
|
|
|
|
if k==asc("@") .and. nextkey()==0
|
|
exit
|
|
#ifdef __HARBOUR__
|
|
elseif k==K_CTRL_INS
|
|
if alert( "Would you like to show clipboard text?", { "YES", "NO" } ) == 1
|
|
s := hb_gtInfo( HB_GTI_CLIPBOARDDATA )
|
|
? "Clipboard text: [" + s + "]"
|
|
endif
|
|
elseif k==K_CTRL_END
|
|
if alert( "Would you like to set clipboard text?", { "YES", "NO" } ) == 1
|
|
s := hb_tstostr( hb_datetime() ) + hb_osNewLine() + ;
|
|
"Harbour " + hb_gtVersion() + " clipboard test" + hb_osNewLine()
|
|
? "New clipboard text: [" + s + "]"
|
|
hb_gtInfo( HB_GTI_CLIPBOARDDATA, s )
|
|
endif
|
|
#endif
|
|
endif
|
|
enddo
|
|
?
|
|
return nil
|