From 0deaf110dde59f7055bb22b402bdab1c4874acc9 Mon Sep 17 00:00:00 2001 From: Walter Negro Date: Tue, 30 Apr 2002 03:56:21 +0000 Subject: [PATCH] * source/rtl/memoedit.prg ! Add support for Set Key defined Keys. From xHarbour by Luiz Culik ! Fix minor bug related with this. --- harbour/source/rtl/memoedit.prg | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/harbour/source/rtl/memoedit.prg b/harbour/source/rtl/memoedit.prg index 28fc54b7d3..4850aeb71e 100644 --- a/harbour/source/rtl/memoedit.prg +++ b/harbour/source/rtl/memoedit.prg @@ -104,6 +104,7 @@ METHOD Edit() CLASS TMemoEditor // NOTE: K_ALT_W is not compatible with clipper exit memo and save key, but I cannot discriminate // K_CTRL_W and K_CTRL_END from harbour code. local aConfigurableKeys := {K_CTRL_Y, K_CTRL_T, K_CTRL_B, K_CTRL_V, K_ALT_W, K_ESC } + local bKeyBlock // If I have an user function I need to trap configurable keys and ask to // user function if handle them the standard way or not @@ -119,6 +120,11 @@ METHOD Edit() CLASS TMemoEditor nKey := Inkey(0) + if ! ( ( bKeyBlock := Setkey( nKey ) ) == NIL ) + eval( bKeyBlock ) + loop + endif + // Is it a configurable key ? if AScan(aConfigurableKeys, nKey) > 0 nUserKey := Do(::xUserFunction, iif(::lDirty, ME_UNKEYX, ME_UNKEY), ::nRow, ::nCol - 1)