# Handling touchscreen buttons

- List: linux-input
- 3 messages, 2 authors
- Page: https://ratatoskr.run/linux-input/2007/09/8908901/t

## Handling touchscreen buttons

- From: Kristoffer Ericson \<kristoffer.ericson@gmail.com\>
- Date: 2007-09-24 04:39:13 
- Message: https://ratatoskr.run/linux-input/2007/09/8908901.md

```text
Greetings,

On my jornada7xx I have 4 buttons on the rightside of the screen (going from Y-low -> Y-high). They are part of the touchscreen.
Since they aren't usually used in normal X window handling I was thinking that I should have the driver detect if the touch happend on one of those buttons.
The general idea is that I could somehow export detection into /sys so that ordinary applications could make use of them. Example would be that touching one button could be scripted to start an xterm or anything else.

Im interested to know if anyone has any examples or suggestion how to best accomplish this?

Best wishes
Kristoffer Ericson
Maintainer : HP7xx & HP6xx
```

## Re: Handling touchscreen buttons

- From: Dmitry Torokhov \<hidden\>
- Date: 2007-09-25 05:44:16 
- Message: https://ratatoskr.run/linux-input/2007/09/8908913.md

```text
On Monday 24 September 2007, Kristoffer Ericson wrote:
> Greetings,
> 
> On my jornada7xx I have 4 buttons on the rightside of the screen (going from Y-low -> Y-high). They are part of the touchscreen.
> Since they aren't usually used in normal X window handling I was thinking that I should have the driver detect if the touch happend on one of those buttons.
> The general idea is that I could somehow export detection into /sys so that ordinary applications could make use of them. Example would be that touching one button could be scripted to start an xterm or anything else.
> 
> Im interested to know if anyone has any examples or suggestion how to best accomplish this?
> 


I'd just send KEY_PROG1 .. KEY_PROG4 events through the same input
device you send the rest of touchscreen events.

-- 
Dmitry
```

## Re: Handling touchscreen buttons

- From: Kristoffer Ericson \<kristoffer.ericson@gmail.com\>
- Date: 2007-09-25 18:34:41 
- Message: https://ratatoskr.run/linux-input/2007/09/8908914.md

```text
On Tue, 25 Sep 2007 01:44:16 -0400
Dmitry Torokhov [ref] wrote:

> On Monday 24 September 2007, Kristoffer Ericson wrote:
> > Greetings,
> > 
> > On my jornada7xx I have 4 buttons on the rightside of the screen (going from Y-low -> Y-high). They are part of the touchscreen.
> > Since they aren't usually used in normal X window handling I was thinking that I should have the driver detect if the touch happend on one of those buttons.
> > The general idea is that I could somehow export detection into /sys so that ordinary applications could make use of them. Example would be that touching one button could be scripted to start an xterm or anything else.
> > 
> > Im interested to know if anyone has any examples or suggestion how to best accomplish this?
> > 
> 
> 
> I'd just send KEY_PROG1 .. KEY_PROG4 events through the same input
> device you send the rest of touchscreen events.
> 
Great idea, big thanx.


> -- 
> Dmitry
```
