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)