Replies: 3 comments
-
currently just warped windows DLL |
Beta Was this translation helpful? Give feedback.
-
I'm facing the same issue as you, and it's really frustrating. I think Avalonia's current handling of this is terrible. |
Beta Was this translation helpful? Give feedback.
-
hi, i just build for win only and i just warped the win api call i think
its called `getkeysatatew` it works perfectly but i think its translated to
scan code? idk you may double check if you have multi-keybored but it work,
last note dont use `avalonia key enum` value bc it dosnt match win enum
value
but yeah pretty annoying hope they add more low-level control like QT
framework when you can loop-event and pick what you want, the funny stuff
like mouse being translated to to pointer and if you want just mouse you
need see the pointer if it has mouse with nested `if statement`, like this
not performance friendly (i know it's not noticeable on modern hardware but
why double code for something should be less?) like avalonia
`mouse->pointer->mouse`? when i wish it just mouse
but to be fair I think bc Linux is doing a lot of restriction making so
global hocking wont work easy unless you are in x11 as i read before
idk but if this on windows i dont like be forced `window event messages`
that being managed by OS and being mixed with other message like mouse
event window position, all key down/up event it's not clean and you need ad
loop and above that windows don't allow non-main thread to see window
messages , so gl if you don't want deal with UI being hanged there other
way you can hock window but i didn't manage to do that lol but will be good
new for `drag drop files` event without forcing the app being single thread.
…On Sun, Jul 20, 2025 at 1:39 PM buskysnow ***@***.***> wrote:
Hi, I'm struggle to convert my WPF code to Avalonia ,I dont want subscribe
to Top level and write bunch of boolen will be nightmare for me because I'm
going to use a lot of keys,
this in WPF
private void Button_Click(object sender, RoutedEventArgs e)
{
if (Keyboard.IsKeyDown(Key.F1))
{
LayerdInfo.Show(KEYDIR.GENRATE.BUTTON);
}
}
in avalonia I saw there Avalonia.input but it doesn't have isKeydown
method any idea thx?
Edit please no top level or window e method, will be hard to maintain.
I'm facing the same issue as you, and it's really frustrating. I think
Avalonia's current handling of this is terrible.
—
Reply to this email directly, view it on GitHub
<#18546 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYGT5YXTTJFQBEHFK4PRWTL3JN5XLAVCNFSM6AAAAAB2AWAKQWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGOBSGM3TAMI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm struggle to convert my WPF code to Avalonia ,I dont want subscribe to Top level and write bunch of boolen will be nightmare for me because I'm going to use a lot of keys,
this in WPF
in avalonia I saw there Avalonia.input but it doesn't have isKeydown method any idea thx?
Edit please no top level or window e method, will be hard to maintain.
Beta Was this translation helpful? Give feedback.
All reactions