# Event Filter Config To Rotate Touchscreen Input

**URL:** <https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277>\
**Category:** Hardware\
**Created:** [February 7, 2026, 7:33am UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277 "2026-02-07T07:33:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjkarcher](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@jjkarcher](https://genode.discourse.group/u/jjkarcher)\
**Post date:** [February 7, 2026, 7:33am UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/1 "2026-02-07T07:33:44Z")

</div>

I have tried a few times to set up “event\_filter” to rotate the touch input to match the framebuffer rotation, using the “rotate” or “reorient” tags, as described in the README, but without success.

Could someone provide a snippet of a working example of this, which I could use as a starting point.

Thanks!

---

<div class="post-metadata">

**Author:** ![Nos](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@Nos](https://genode.discourse.group/u/Nos)\
**Post date:** [February 8, 2026, 4:47pm UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/2 "2026-02-08T16:47:43Z")

</div>

Good point. I would also like to know how to rotate the touchscreen input. Then we could think about how to combine the two, but first one step at a time.

---

<div class="post-metadata">

**Author:** ![jschlatow](https://dub1.discourse-cdn.com/flex006/user_avatar/genode.discourse.group/jschlatow/32/12_2.png) [@jschlatow](https://genode.discourse.group/u/jschlatow)\
**Post date:** [February 19, 2026, 10:12am UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/3 "2026-02-19T10:12:35Z")

</div>

Sorry for the late reply. The transformations described in the README are, indeed, very basic. What worked for me with a display resolution of 2160x1440:

- rotate the by screen 90 degree
- add `<reorient angle=”270” width=”1440” height=”2160”/>` to the _/config/event\_filter_

I had to find this by try-and-error using a surrounding `<log motion=”yes”>` around the `<transform>` node.

---

<div class="post-metadata">

**Author:** ![Nos](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@Nos](https://genode.discourse.group/u/Nos)\
**Post date:** [February 21, 2026, 10:12am UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/4 "2026-02-21T10:12:02Z")

</div>

Oh, great. I will try it today.

---

<div class="post-metadata">

**Author:** ![chelmuth](https://dub1.discourse-cdn.com/flex006/user_avatar/genode.discourse.group/chelmuth/32/1_2.png) [@chelmuth](https://genode.discourse.group/u/chelmuth)\
**Post date:** [February 22, 2026, 11:17am UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/5 "2026-02-22T11:17:42Z")

</div>

> [@jschlatow](#):
>
> The transformations described in the README are, indeed, very basic. […] I had to find this by try-and-error using a surrounding `<log motion=”yes”>` around the `<transform>` node.

That’s a quite valid remark. We should improve the README with the given example.

---

<div class="post-metadata">

**Author:** ![Nos](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@Nos](https://genode.discourse.group/u/Nos)\
**Post date:** [February 22, 2026, 6:43pm UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/6 "2026-02-22T18:43:15Z")

</div>

Ok, now it works. I had to rotate the display (using the intel\_fb component in Leitzentrale) to `90°` and the touchdisplay (using the reorient angle in event\_filter) to `270` (or vice versa). I assigned to width and height the values of the rotated display.

Here the modified snippet from my `/config/event-filter`:

```auto
         <transform>
            <input name="usb"/>
            <scale x="0.164" y="0.164"/>
            <reorient angle="270" width="1080" height="1920" />
          </transform>

```

---

<div class="post-metadata">

**Author:** ![jschlatow](https://dub1.discourse-cdn.com/flex006/user_avatar/genode.discourse.group/jschlatow/32/12_2.png) [@jschlatow](https://genode.discourse.group/u/jschlatow)\
**Post date:** [February 26, 2026, 10:46am UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/7 "2026-02-26T10:46:00Z")

</div>

Looking at the implementation and refreshing my knowledge about rotation matrices from Wikipedia, I suspect that the rotation/reorientation is rather implemented as a counter-clockwise rotation. @chelmuth Can you confirm/refute that?

---

<div class="post-metadata">

**Author:** ![chelmuth](https://dub1.discourse-cdn.com/flex006/user_avatar/genode.discourse.group/chelmuth/32/1_2.png) [@chelmuth](https://genode.discourse.group/u/chelmuth)\
**Post date:** [February 26, 2026, 6:38pm UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/8 "2026-02-26T18:38:17Z")

</div>

IIRC it’s implemented in the mathematical positive sense, i.e., counter-clockwise.

EDIT: The README states the opposite: _Rotates clockwise (around origin (0,0) by 90, 180, or 270 degrees in attribute ‘angle’._ So, maybe I’m mistaken.

---

<div class="post-metadata">

**Author:** ![chelmuth](https://dub1.discourse-cdn.com/flex006/user_avatar/genode.discourse.group/chelmuth/32/1_2.png) [@chelmuth](https://genode.discourse.group/u/chelmuth)\
**Post date:** [February 27, 2026, 7:12am UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/9 "2026-02-27T07:12:18Z")

</div>

I checked the implementation with a small Linux [test](https://gist.github.com/chelmuth/636d6101f65523f3c260ac47f6864f56). My memory is not deceiving me: rotate and reorient operate counter-clockwise.

```auto
( 5, 0) rotate(90) ( 0, 5) ... ( 5, 0) reorient(90, 200, 100) (199, 5)
( 0, 5) rotate(90) ( -5, 0) ... ( 0, 5) reorient(90, 200, 100) (194, 0)
( 20, 10) rotate(90) (-10, 20) ... ( 20, 10) reorient(90, 200, 100) (189, 20)

```

I’ll improve the documentation accordingly.

EDIT: [This](https://github.com/genodelabs/genode/commit/721f3af40dae3bdd22736783f28e6e0725107beb) commit on staging adapts the doc.

---

<div class="post-metadata">

**Author:** ![jjkarcher](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@jjkarcher](https://genode.discourse.group/u/jjkarcher)\
**Post date:** [February 28, 2026, 6:14pm UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/10 "2026-02-28T18:14:00Z")

</div>

I’ve been on the road for the past week, so I’m just testing this now, and it worked! Woo Hoo! 🎉

Thanks for the tip! Things are getting interesting in touchscreen world…

---

<div class="post-metadata">

**Author:** ![jschlatow](https://dub1.discourse-cdn.com/flex006/user_avatar/genode.discourse.group/jschlatow/32/12_2.png) [@jschlatow](https://genode.discourse.group/u/jschlatow)\
**Post date:** [March 2, 2026, 2:24pm UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/11 "2026-03-02T14:24:21Z")

</div>

Let me add a brief explanation for the rotation angle: When the framebuffer has been rotated by 90 degrees clockwise, e.g. using the intel\_fb UI in the Leitzentrale, you need to rotate the device counter clockwise in order to compensate the framebuffer rotation. The configuration of the event filter must be seen in relation to the rotation of the device, not the framebuffer. This explains why the reorientation angle must be set to 270 in this example.

---

<div class="post-metadata">

**Author:** ![jjkarcher](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@jjkarcher](https://genode.discourse.group/u/jjkarcher)\
**Post date:** [March 10, 2026, 10:25pm UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/12 "2026-03-10T22:25:19Z")

</div>

This doesn’t really advance the discussion, but I would just like to say again how much fun it is to use Sculpt in touch mode on the large screen (including rotation)! (This has been a long-time dream of mine. 🥳 )

For those who haven’t thought about it, I should also point out that Leitzentrale works really well with touch. The button sizes are perfect, and it avoids right mouse clicks and things like hover, so it translates very cleanly. (I personally wouldn’t mind those things for advanced features, but that would complicate the touch interface.)

Thanks again to all involved!

---

<div class="post-metadata">

**Author:** ![Nos](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@Nos](https://genode.discourse.group/u/Nos)\
**Post date:** [March 11, 2026, 7:59pm UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/13 "2026-03-11T19:59:42Z")

</div>

If I would like to write a script that couple the rotation of both (touchinput and display) what would be a good starting point?

---

<div class="post-metadata">

**Author:** ![jschlatow](https://dub1.discourse-cdn.com/flex006/user_avatar/genode.discourse.group/jschlatow/32/12_2.png) [@jschlatow](https://genode.discourse.group/u/jschlatow)\
**Post date:** [March 12, 2026, 7:07am UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/14 "2026-03-12T07:07:44Z")

</div>

I think I’d try to use the ROM filter to watch for changes to _/config/managed/fb_ and generate the part of the event filter’s config. I’ve done a very similar thing for [dynamic key remapping](https://genodians.org/jschlatow/2021-06-11-user-keys) that you could take as a blueprint.

---

<div class="post-metadata">

**Author:** ![Nos](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@Nos](https://genode.discourse.group/u/Nos)\
**Post date:** [March 12, 2026, 9:44pm UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/15 "2026-03-12T21:44:08Z")

</div>

Oh thanks, I will take a look at it. What do you think about the idea of some kind of rotation sensor (or at least some placeholder for it)? Could this be used as an input for both components?

---

<div class="post-metadata">

**Author:** ![jschlatow](https://dub1.discourse-cdn.com/flex006/user_avatar/genode.discourse.group/jschlatow/32/12_2.png) [@jschlatow](https://genode.discourse.group/u/jschlatow)\
**Post date:** [March 16, 2026, 1:32pm UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/16 "2026-03-16T13:32:37Z")

</div>

Using the builtin accelerometer to determine the device’s orientation would be great. We’re currently lacking any driver of this kind, though. If we had such a driver, the sensed device orientation could for sure be used as an input for rotating the framebuffer and the touch coordinates. Instead of a mere auto-rotating policy, however, I’d be much more in favor of a UI that asks the user to confirm the rotation first since auto-rotation can be quite annoying at times.

---

<div class="post-metadata">

**Author:** ![jschlatow](https://dub1.discourse-cdn.com/flex006/user_avatar/genode.discourse.group/jschlatow/32/12_2.png) [@jschlatow](https://genode.discourse.group/u/jschlatow)\
**Post date:** [March 19, 2026, 10:39am UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/17 "2026-03-19T10:39:29Z")

</div>

@nos I just published another Sculpt image with revised touch support (sculpt-pc-2026-03-19-hw). It also comes with a _touch\_rotate_ launcher. The latter creates a _/config/keyboard/touch.merge_ file based on the rom\_filter config specified at _/config/keyboard/touch.config_. You’ll find an exemplary config that you can modify to your needs (probably only the input name and the scaling factors). If you are fine with the generated _/config/keyboard/touch.merge_, you can include it into the _merge_ node of your _/config/event\_filter._

---

<div class="post-metadata">

**Author:** ![jjkarcher](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@jjkarcher](https://genode.discourse.group/u/jjkarcher)\
**Post date:** [March 19, 2026, 5:07pm UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/18 "2026-03-19T17:07:50Z")

</div>

Thanks for the continued work on this!

I installed this image, but I don’t see the “touch\_rotate” launcher. It should be in “config/launcher”, right?

P.S. I like the background widgets you set up for these images. I need to look at how you set those up. 🙂

---

<div class="post-metadata">

**Author:** ![jschlatow](https://dub1.discourse-cdn.com/flex006/user_avatar/genode.discourse.group/jschlatow/32/12_2.png) [@jschlatow](https://genode.discourse.group/u/jschlatow)\
**Post date:** [March 20, 2026, 11:23am UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/19 "2026-03-20T11:23:59Z")

</div>

@jjkarcher Oops, I missed adding the launcher file to the image, which went unnoticed because I had this in the persistent config folder on my test device. I’ll publish a new image once I implemented a few other changes.

P.S. If you are interested in the details about the dynamic background, you may have a look at the [corresponding article on genodians.org.](http://genodians.org/jschlatow/2024-02-07-system-info)

---

<div class="post-metadata">

**Author:** ![jschlatow](https://dub1.discourse-cdn.com/flex006/user_avatar/genode.discourse.group/jschlatow/32/12_2.png) [@jschlatow](https://genode.discourse.group/u/jschlatow)\
**Post date:** [March 20, 2026, 3:28pm UTC](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277/20 "2026-03-20T15:28:44Z")

</div>

I’ve published sculpt-pc-2026-03-20-hw, which now contains the touch\_rotate launcher.

Please note, that I’ve changed the runtime a bit. It now generates the touch.transform, touch.touch-key and touch.touch-gesture files from the touch\_transform.config, touch\_key.config and touch\_gesture.config files respectively. The generated files can be included inside the `transform`, `touch-key` or `touch-gesture` nodes of your /config/event\_filter. Long story short: You only need to adapt (or remove) the scaling factors in /config/keyboard/touch\_transform.config and put something like this in your /config/event\_filter at the right place:

```xml
<transform>
  <input name="usb"/>
  <include rom="keyboard/touch.transform"/>
</transform>

```

[Next page](https://genode.discourse.group/t/event-filter-config-to-rotate-touchscreen-input/277.md?page=2)
