> For the complete documentation index, see [llms.txt](https://sandbox-docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sandbox-docs.verifone.com/adk-5.0-programmers-guide/touch_8h_source.md).

# touch.h

[Go to the documentation of this file.](/adk-5.0-programmers-guide/readme/files/dir_44d926a17fc606d3c25449ba60427c63/dir_048f823fee1bfb22502a8732b9a001aa/touch_8h.md)

```cpp
 1 #ifndef TOUCH_H
 2 #define TOUCH_H
 3 
 4 #include "sys.h"
 5 
 6 #include <svcsec.h>
 7 
 8 #include <string>
 9 #include <vector>
 10 #include "csd.h"
 11 
 12 
 13 //TODO: can we use constants defined somewhere else?
 14 enum SpecialKey
 15 {
 16  keyCancel = 27,
 17  keyOK = 13,
 18  keyCorrection = 8,
 19  keyNoKey = 0
 20 };
 21 
 22 class TouchPad
 23 {
 24  public:
 25  //use touch_hotspot_info from <svcsec.h>
 26  typedef touch_hotspot_info t_hotspot;
 27  typedef std::vector<t_hotspot> t_hotspots;
 28 
 29  typedef void (* callback_t)(unsigned char, csd::csd_string);
 30 
 34  static TouchPad &getInstance()
 35  {
 36  static TouchPad instance;
 37  return instance;
 38  }
 39 
 40  ~TouchPad();
 41 
 42  void setHotspots(const t_hotspots &hotspots);
 43 
 55  int enterData(csd::csd_string &data, enum DataEntryType entryType, callback_t cb, unsigned char minInputLength, unsigned char maxInputLength, unsigned short timeout = 0, unsigned char skipCb9FFE = 0);
 56  int sendHotspotsToVault(); //send hotspots to vault
 57 
 58  private:
 59  TouchPad();
 60  TouchPad(const TouchPad &other); // non construction-copyable
 61  TouchPad &operator=(const TouchPad &); // non copyable
 62 
 63 
 64  t_hotspots m_hotspots;
 65 
 72  char click(int x, int y);
 73 };
 74 
 75 #endif // TOUCH_H
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sandbox-docs.verifone.com/adk-5.0-programmers-guide/touch_8h_source.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
