^KeyStroke and ^DataChg: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
As of [[4.30]]  
As of [[4.30]], two new [[INPUT FIELDS]] field attributes are now supported which provide detailed control of user input:
Two new INPUT FIELDS field attributes are now supported which provide detailed control of user input:
*^KEYSTROKE - return control to the program when a keystroke is entered
*^KEYSTROKE - return control to the program when a keystroke is entered
*^DATACHG - return control to the program when data is changed
*^DATACHG - return control to the program when data is changed
Line 11: Line 10:
*142 - ( applies only to ^KEYSTROKE ) the data is unchanged but a key was pressed or a mouse action occurred that did not trigger a field exit
*142 - ( applies only to ^KEYSTROKE ) the data is unchanged but a key was pressed or a mouse action occurred that did not trigger a field exit


When a key is pressed with ^KEYSTROKE or ^DATACHG that sets a 140, 141 or 142 FKEY, it will also set the [[KStat$]] value.  This allows the program to see what key was pressed. This KSTAT$ value will be cleared on the next (RINPUT fields operation.  
When a key is pressed with ^KEYSTROKE or ^DATACHG that sets a 140, 141 or 142 FKEY, it will also set the [[KStat$]] value.  This allows the program to see what key was pressed. This KSTAT$ value will be cleared on the next [[RINPUT Fields]] operation.  


If a navigation key operates within the field and ^KEYSTROKE is specified, it triggers fkey 142. If the navigation key causes focus to leave the field, fkeys 140-142  are not generated and KSTAT is not set.  
If a navigation key operates within the field and ^KEYSTROKE is specified, it triggers fkey 142. If the navigation key causes focus to leave the field, fkeys 140-142  are not generated and KSTAT is not set.  


;Release 4.3 Note  
;Note  
While shift, control and alt do not change either the functionality or fkey value of navigation keys, KSTAT$ produces unique values for each of these settings. This complicates things a bit but provides more options for programmed responses to custom key combinations.
While shift, control and alt do not change either the functionality or fkey value of navigation keys, KSTAT$ produces unique values for each of these settings. This complicates things a bit but provides more options for programmed responses to custom key combinations.



Latest revision as of 16:33, 19 September 2014

As of 4.30, two new INPUT FIELDS field attributes are now supported which provide detailed control of user input:

  • ^KEYSTROKE - return control to the program when a keystroke is entered
  • ^DATACHG - return control to the program when data is changed

(a subset of ^KEYSTROKE)

When control is returned to a program as a result of these attributes, one of three new Fkey values is applied:

  • 140 - a character was appended to the data
  • 141 - the data changed other than appending a character
  • 142 - ( applies only to ^KEYSTROKE ) the data is unchanged but a key was pressed or a mouse action occurred that did not trigger a field exit

When a key is pressed with ^KEYSTROKE or ^DATACHG that sets a 140, 141 or 142 FKEY, it will also set the KStat$ value. This allows the program to see what key was pressed. This KSTAT$ value will be cleared on the next RINPUT Fields operation.

If a navigation key operates within the field and ^KEYSTROKE is specified, it triggers fkey 142. If the navigation key causes focus to leave the field, fkeys 140-142 are not generated and KSTAT is not set.

Note

While shift, control and alt do not change either the functionality or fkey value of navigation keys, KSTAT$ produces unique values for each of these settings. This complicates things a bit but provides more options for programmed responses to custom key combinations.