https://kotlinlang.org logo
Title
c

Casey Brooks

12/17/2020, 4:43 PM
Is there any way to handle right-click events?
Modifier.clickable()
has a long-click event (which doesn’t seem to do anything on desktop) but not a right-click
🤔 2
i

Igor Demin

12/17/2020, 4:58 PM
Unfortunately, no. You can track progress here: https://github.com/JetBrains/compose-jb/issues/129 We are planning to rethink how we should handle mouse events.
👌 2
b

Big Chungus

12/17/2020, 5:00 PM
I think long click would make sense to be right click on desktop
c

Casey Brooks

12/17/2020, 5:06 PM
Yeah that was my first thought @Big Chungus, and maybe name it something more generic to be able to be transparently shared across both mobile and desktop
e

eygraber

12/17/2020, 10:46 PM
I remember it being called a context click on some framework a while ago
x

xetra11

12/18/2020, 7:53 AM
@Igor Demin start using Github Discussions to have a more throughout thinktank for that
p

py

01/06/2021, 9:58 PM
Just found this thread as I was looking for right click. A follow up on that: once we’ve got right click it’ll be nice to have an easy way to build a contextual menu. Can be done manually but would be nice to have an easy API. That being said, first things first, it’s moot without right click support 🙂