Shortcut to rotate image 180°?

In lighttable view, I have set shortcuts to rotate the image 90° CW or CCW with , and ..
However, I noticed that some old images are often wrongly rotated 180°. Using the shortcuts twice takes some time, especially as you cannot simply press the button twice in a row fast but have to wait until the image is rotated by 90° to press it again.

I wonder if it is possible to setup a shortcut to rotate the image by 180° (or twice 90°)?

I think it’s not possible. What I would do for that would be make rotation for first image with orientation module (or with shortcut). Then copy/paste that module only on all other images. Be sure to be on append mode in development module.

Yes, that would be an option. But I also found out that many of those images turn up correct in the thumbnails but are rotated as soon as I open them either in fullscreen mode or darkroom. Not sure what that is about though…
Thus a method where I can quickly apply it, for example, during fullscreen mode would be really nice.

I also thought about the possibility of lua scripts: I could setup a style that has the 180° orientation and then apply that via a lua script - which can be called by shortcut.
But I’m lost a bit in the API documentation. Can you not just find a style by name and apply it? It seems you would have to iterate over all styles and find the correct one to apply it?
There is also no option to apply a certain orientation directly with lua, without the need for a style?

I think you can call a module preset now from a lua script so if you set the syntax right and assign the key it should work…

No need for lua. You can already assign shortcuts to presets. In fact there’s already a “rotate by 180 degrees” preset pre-defined, so all you need to do is assign a shortcut to it.

But this does not work in lighttable view - or does it? Can you setup preset shortcuts, that work from lighttable? I can only use this shortcut then in darkroom view.

Furthermore it does not work as expected: If I apply this preset to the image, these images go into landscape mode.
These images, which are upside-down were shot with a Canon 350D in portrait mode and for some reason the orientation is flipped there. What’s happening is the following: The orientation of the image is landscape. Then it is rotated by 90° when importing (but in the wrong direction), but if the 180° preset is applied, the rotation is reset (to landscape) and then it is rotated by 180°.
(My initial question might be a XY-Problem though, with the actual issue beeing “how to correctly import those images” but a rotate by 180° is also something that can be used in many instances)

Ah sorry missed the vital bit of information there (lighttable)