IPeople Blog

Find ASCII Codes for keystrokes for use with the FD Footnote in MEDITECH CS

Written by Gary | Feb 14, 2022 6:00:00 AM

The Footnote FD (Field Delimiter) requires you to enter the ASCII code for a keystroke.  For instance, 9 is the ASCII code for the <Tab> keystroke.  Instead of looking up these ASCII codes on the internet, you can create an NPR Report that allows you to press the keys and their ASCII codes will be displayed on the screen.  Here are the steps: 

  1. Select Report DPM MIS.USER and any report name you like.
  2. Add a Report Title: "_%(MIS)USER..zcus.report.M..s(0)_"
    Replace 'report' with the name of your report.
  3. Add this Footnote: AL START start
  4. File and translate your report.
  5.  Add a macro called s with the following code:
      IF{'/GO 1^/GO,1^/Z.PRT.SUPPRESS.PRINTING^/R.FRAGMENT},
         "Press Any Key for ASCII Code or <Esc> to Exit";
  6. File and translate your macro.
  7. Add a macro called start with the following code:
    DO{E(#S^Y)^X'=@Z.esc.key P(0,0,X:10L)_P(0,15,Y:0X)^#},
         @W.return("ASCII code for <Esc> is "_@Z.esc.key)
  8. File and translate your macro and then retranslate your report.