FKey

From BR Wiki
Revision as of 11:05, 25 January 2012 by Mikhail.zheleznov (talk | contribs)
Jump to navigation Jump to search

The FKey internal function is similar to CmdKey, but returns more information, particularly about how a field is exited. A HotKey is very similar to either of these, but is different in that hotkey is not a control word, statement, nor internal function. A HotKey is simply an FKey value that was assigned via Hot Text or a print fields or input fields that makes a clickable control.

The following table shows a comparison of the values that are returned by FKey and CmdKey when a particular key is pressed to terminate field input.

FKey(X) sets the value of FKey to X. It also sets the value of CmdKey. However, if X is greater than 91 then CmdKey is set to zero. Likewise, the function CmdKey(X) sets both CmdKey and FKey to the value of X.


Standard FKeys

FKey value Cause Additional
1 F1
2 F2
3 F3
4 F4
5 F5
6 F6
7 F7
8 F8
9 F9
10 F10
11 F11 or Shift+F1
12 F12 or Shift+F2
13 Shift+F3
14 Shift+F4
15 Shift+F5
16 Shift+F6 or Alt+Q
17 Shift+F7 or Alt+W
18 Shift+F8 or Alt+E
19 Shift+F9 or Alt+R
20 Shift+F10 or Alt+T
21 Ctrl+F1 or Alt+Y
22 Ctrl+F2 or Alt+U
23 Ctrl+F3 or Alt+I
24 Ctrl+F4 or Alt+O
25 Ctrl+F5 or Alt+P
26 Ctrl+F6
27 Ctrl+F7
28 Ctrl+F8
29 Ctrl+F9
30 Ctrl+F10 or Alt+A *
31 Ctrl+F11 or Alt+S *
32 Ctrl+F12 or Alt+D *
33 Alt+F *
34 Alt+G *
35 Alt+H *
36
37 Alt+K *
38 Alt+L *
39
40
41
44 Alt+Z *
45 Alt+X *
46 Alt+C *
47 Alt+V *
48 Alt+B *
49 Alt+N *
50 Alt+M *
90 page up
91 page down
92 tab change
93 Application Exit, Alt+F4 or Big X An Option exist to reassign this to a different value
98 Drop Down Menu ??
99 Escape or Alt+J *
100 Ctrl+Y
104 AE field exit
105 AE field exit
106 AE field exit
107 AE field exit
110 AE field exit (Tab)
200 click
201 Double Click (Requires Option (config) 52)
* Alt+Key combinations will not work if a drop down menu co-exists with that letter specified as hot (with a &) at any level of the menu.


FKey 200 and FKey 206 are similar. On windows machines with single click enabled a 200 will be returned instead of a 206.

From a GRID with AEX attributes

These have been tested and should probably be added the the chart above.

FKey value Cause Additional
91 Ctrl+Left
110 Tab
111 Shift+Tab
112 Home
113 End
114 Field Plus (+) (the Plus key on the number pad)
116 Right
120 Ctrl+End or Shift+End
126 Ctrl+Up
127 Ctrl+Down
133 Shift+Left
134 Shift+Right
135 Shift+Up
136 Shift+Down
200 Double Click (sometimes - also 201) Also Click on windows machines with the single click preference enabled.
201 Double Click (sometimes - also 200) (Requires Option (config) 52)
206 Click


From a GRID with LX attributes

FKey value Cause Additional
124 Mouse Wheel scroll up
125 Mouse Wheel scroll down

From a TextBox with AEX attributes

These have been tested and should probably be added the the chart above. FKey values listed in the GRID with AEX section above are not duplicated here.

FKey value Cause Additional
102 Up
103 Left (from leftmost position)
104 Down

From a GRID with L attributes

FKey value Cause Additional
105 Attempt to Scroll past top
106 Attempt to Scroll past bottom

KStat Only

The KStat internal function will return a few additional FKey values which Input Fields and Input Select will not. These FKeys are as follows:

FKey Description
176 Click
177 Second Click in Double Click
180 Right Click
181 Second Click in Double Right Click

Combobox Only

Comboboxes that contain the x attribute often return FKey 209 in such cases use curfld(curfld,fkey) to avoid blinking.


    do
      rinput #win,fields mat io$,attr '[A]': mat setting$,choice_policy$,choice_desc$
      if fkey=209 then let curfld(curfld,fkey)
    loop until fkey<>209


Hot Windows

For versions 4.2 and higher FKEY= may now be specified in a window OPEN statement. This makes the window hot, so a user can click anywhere in the window to tell the program that they want to switch focus. This is inheritable, but not to independent windows. In other words, assigning an FKEY value to a window automatically assigns the same FKEY value to it's child windows, unless another FKEY ( or -1 ) is assigned to a child.



Days() Processing Made More Flexible

If a date format mask omits month, day, year and/or century BR now assumes the first day of the current month for the respective omitted mask components. Values must conform to masks with the following exceptions:

   * Any valid format for month or day is accepted on input where the mask requests the respective month or day.
   * Any valid separator will be accepted where any separator is specified by the mask.

examples-

  days("Tuesday 23 January, 2007",'day dd month, ccyy') -> 39104
  days("January, 2007",'day dd month, ccyy') -> 39082  (day 1 assumed)
  days("Tuesday 23 Jan; 07",'day dd m3, yy') -> 39104  (note mm yy separator)
  days("Tuesday 23 Jan/ 07",'day dd m3, yy') -> 39104
  days("Tuesday 23 Jan; 07",'day dd m3, yy') -> 39104
  days("Tuesday 23 Jan- 07",'day dd m3, yy') -> 39104
  days("23 Jan;",'dd m3,')                   -> 40200  (current year and century)

We do require that the entered value conform to the specified mask to avoid the entry of incorrect dates using unforseen valid expressions.

We will allow a null mask, but the omission of a mask does not denote a null mask. It denotes whatever the system default mask is currently set to, which could be the system default.