Keypress Script

Build 1501 on 14/Nov/2017  This topic last edited on: 9/May/2012, at 13:03

Description

Script to handle presses of keys 0..9.

Syntax

Keypress(icol, q)

icol

number of columns - indeed, the value of the key pressed. e.g. 0..9

q

GetQualifier value

Code

  Public Sub KeyPress(ByVal iCol, ByVal q)

    Select Case Page.GetSelectedKind

      Case POK.oBitmap

        If ImgSubType() <> -POK.oBitmap Then

          ImgInflateSgm("Keypress", "to", iCol, 0, "R")

        Else

          Resplit(iCol, IIf(q = 1, True, False), True)

        End If

      Case POK.oFrame

        Resplit(iCol, IIf(q = 1, True, False))

      Case POK.oBox

        If q = 0 Then

          Page.ObjSetHW(-1, SetW(iCol))

        ElseIf q = 1 Then

          Resplit(iCol, True)

        End If

      Case POK.oRule

        If iCol > 0 Then Page.ObjSetHW(-1, SetW(iCol))

    End Select

  End Sub

See also

KeyP Script, KeyPressX Script