这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@lvonasek
Copy link
Contributor

@lvonasek lvonasek commented Jul 8, 2024

This addresses XR issues mentioned in #665.

  • Support XR mode without controllers (patch of AndroidManifest.xml)
  • Set resolution for "native" lower (patch of LorieView.java)
  • Support for BT/OTG keyboard (patch of XrActivity.java)

Comment on lines 141 to 144
if (XrActivity.isEnabled()) {
width = 1024;
height = 1024;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably it will be better to use some 16:9 or at least 4:3 resolution. 1:1 resolution are not the best for human eye perception.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made it 4:3 in 27b52aa

Comment on lines 206 to 209
// Bluetooth/OTG keyboards work properly with the standard flow
if (hasFocus) {
return super.dispatchKeyEvent(event);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is hasWindowFocus function, no need to store current window focus value in separate variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed that in 27b52aa

}

@Override
public boolean dispatchKeyEvent(KeyEvent event) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does LorieView's dispatchKeyEventPreIme work in the case if Activity's dispatchKeyEvent is overridden?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Software keyboard sends randomly event with KEYCODE_MEDIA_PLAY into dispatchKeyEventPreIme.
Hardware keyboard works sends correct events into dispatchKeyEventPreIme.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am sorry, I do not understand how is your question related to the code.

What change do you require here?

@lvonasek lvonasek requested a review from twaik July 8, 2024 13:11
@twaik
Copy link
Member

twaik commented Jul 8, 2024

There are pending reviews.

@twaik
Copy link
Member

twaik commented Jul 14, 2024

@lvonasek can you please read pending reviews and respond?

@lvonasek
Copy link
Contributor Author

I responded to not answered reviews (although I thought this was clear, I am sorry for the misunderstanding).

About the answer from @natebragg:

twaik that did not work, although I was only able to test it in XR mode, since the option to disable it was not present in the preferences

I think the user reacted to ctrl+space issue which isn't expected to work in the XR mode neither (the same issue like #665).

@twaik
Copy link
Member

twaik commented Jul 14, 2024

They are still considered to be pending.
Screenshot_20240714_094501_Brave

@lvonasek
Copy link
Contributor Author

They are still considered to be pending. Screenshot_20240714_094501_Brave

There must be some issue with GitHub. These comments aren't visible for me. But let me clarify it here:
dispatchKeyEventPreIme is called, with randomly receiving KEYCODE_MEDIA_PLAY from software keyboard. But only up events.

These events are not passing into dispatchKeyEvents. Do you still require to add KEYCODE_MEDIA_PLAY filtering although there is no negative effect by it?

I personally prefer to avoid "hacky" code if it is not necessary.

@twaik
Copy link
Member

twaik commented Jul 14, 2024

What about the last one?

@lvonasek
Copy link
Contributor Author

What about the last one?

Yes, dispatchKeyEventPreIme is called correctly.

@twaik twaik merged commit 05457b6 into termux:master Jul 14, 2024
@lvonasek lvonasek deleted the hotfix-openxr-input branch July 14, 2024 07:40
@Markadel1
Copy link

@lvonasek Is it possible to add support for other OpenXR-Compatible devices using the Monado runtime for Android? Monado has drivers for Nreal Air/Pro and Rokid glasses. I enjoy using OpenXR mode for Termux-X11 on the Quest, but being able to use it on my glasses would be great!

@lvonasek
Copy link
Contributor Author

  • I do not support custom runtimes due to license madness.
  • The second problem is that your headset doesn't support hybrid apps (switching between Android and VR runtime inside of one app).
  • And without the headset it is hard to do anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants