View Issue Details

IDProjectCategoryView StatusLast Update
0001980NoesisGUIC++ SDKpublic2021-04-30 18:42
Reporterext.mnawrotAssigned Tosfernandez 
PrioritynormalSeveritytweakReproducibilityalways
Status assignedResolutionopen 
Product Version3.0.11 
Target Version3.1Fixed in Version 
Summary0001980: ScrollViewer KeyUp / KeyDown event is not triggered by the xbox pad right thumbstick
DescriptionI was testing gamepad events with the following listeners:

[code] this->KeyDown() += [](BaseComponent* /* sender */, const KeyEventArgs& /* args */)
  {
    std::cout << "key down" << std::endl;
  };

  this->KeyUp() += [](BaseComponent* /* sender */, const KeyEventArgs& /* args */)
  {
    std::cout << "key up" << std::endl;
  };
[/code]

Most of the game pad button were captured except the right thumbstick and the left / right triggers. However the ScrollViewer is using them correctly to scroll the content.

According the UWP spec those events should be included (I know WPF ~= UWP) as following
https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.input.keyroutedeventargs?view=winrt-19041#remarks
TagsNo tags attached.
PlatformAny

Activities

jsantos

jsantos

2021-04-26 13:45

manager   ~0007169

Hi!

Thanks for the report. Could you please describe how important is this feature for you?
ext.mnawrot

ext.mnawrot

2021-04-26 17:37

reporter   ~0007170

It's not urgent but currently we had to write a workaround using the `scrollChanged` event which is shared by all sources of scrolling. We wanted to alter the behavior of right joystick only to add scroll acceleration. At this point we don't see an easy way to do that.
jsantos

jsantos

2021-04-28 11:20

manager   ~0007180

@sfernandez, I wonder if doing the same as the ScrollViewer is doing would be a better workaround? How are Scroll and HScroll events being propagated to controls?
sfernandez

sfernandez

2021-04-28 14:05

manager   ~0007185

Scroll and HScroll functions are generating MouseWheel events. ScrollViewer overrides the MouseWheel event to scroll.
The good thing about Scroll/HScroll is that it uses a float as scroll increment so you can specify the speed of the scrolling.
jsantos

jsantos

2021-04-29 10:39

manager   ~0007187

Last edited: 2021-04-29 10:40

View 3 revisions

Wouldn't it be a better workaround overriding the MouseWheel even then?

ext.mnawrot

ext.mnawrot

2021-04-29 19:39

reporter   ~0007194

I tried the MouseWheel event but it seem not be triggered by the scrollViewer when I used the right joystick
sfernandez

sfernandez

2021-04-29 19:56

manager   ~0007195

Last edited: 2021-04-29 20:22

View 2 revisions

Is it possible that your integration layer is not sending the Scroll/ScrollH events to the IView when the right thumbstick is moved?

ext.mnawrot

ext.mnawrot

2021-04-30 18:42

reporter   ~0007201

then I guess the scroll wouldn't work at all for the right joystick... Here is how integrated with the IView:

```
void SetupDisplay(NoesisApp::Display* display, NoesisApp::RenderContext* ctx, Noesis::Ptr<Noesis::IView> view)
      {
        // Gather window events and send to view
        display->SizeChanged() += [view, ctx](NoesisApp::Display*, uint32_t width, uint32_t height) {
          view->SetSize(width, height);
          ctx->Resize();
        };

        display->Activated() += [view](NoesisApp::Display*) {
          view->Activate();
        };

        display->Deactivated() += [view](NoesisApp::Display*) {
          view->Deactivate();
        };

        display->MouseButtonUp() += [view](NoesisApp::Display*, int x, int y, Noesis::MouseButton b) {
          view->MouseButtonUp(x, y, b);
        };

        display->MouseButtonDown() += [view](NoesisApp::Display*, int x, int y, Noesis::MouseButton b) {
          view->MouseButtonDown(x, y, b);
        };

        display->MouseMove() += [view](NoesisApp::Display*, int x, int y) {
          view->MouseMove(x, y);
        };

        display->MouseDoubleClick() += [view](NoesisApp::Display*, int x, int y, Noesis::MouseButton b) {
          view->MouseDoubleClick(x, y, b);
        };

        display->MouseWheel() += [view](NoesisApp::Display*, int x, int y, int delta) {
          view->MouseWheel(x, y, delta);
        };

        display->Scroll() += [view](NoesisApp::Display*, float delta) {
          view->Scroll(delta);
        };

        display->HScroll() += [view](NoesisApp::Display*, float delta) {
          view->HScroll(delta);
        };

        display->TouchUp() += [view](NoesisApp::Display*, int x, int y, uint64_t id) {
          view->TouchUp(x, y, id);
        };

        display->TouchDown() += [view](NoesisApp::Display*, int x, int y, uint64_t id) {
          view->TouchDown(x, y, id);
        };

        display->TouchMove() += [view](NoesisApp::Display*, int x, int y, uint64_t id) {
          view->TouchMove(x, y, id);
        };

        display->KeyDown() += [view](NoesisApp::Display*, Noesis::Key key) {
          view->KeyDown(key);
        };

        display->KeyUp() += [view](NoesisApp::Display*, Noesis::Key key) {
          view->KeyUp(key);
        };

        display->Char() += [view](NoesisApp::Display*, uint32_t c) {
          view->Char(c);
        };
      }
```

Issue History

Date Modified Username Field Change
2021-04-23 20:47 ext.mnawrot New Issue
2021-04-26 10:38 sfernandez Assigned To => sfernandez
2021-04-26 10:38 sfernandez Status new => assigned
2021-04-26 10:38 sfernandez Product Version 3.1 => 3.0.11
2021-04-26 10:38 sfernandez Target Version => 3.1
2021-04-26 13:45 jsantos Note Added: 0007169
2021-04-26 13:45 jsantos Status assigned => feedback
2021-04-26 17:37 ext.mnawrot Note Added: 0007170
2021-04-26 17:37 ext.mnawrot Status feedback => assigned
2021-04-28 11:20 jsantos Note Added: 0007180
2021-04-28 14:05 sfernandez Note Added: 0007185
2021-04-29 10:39 jsantos Note Added: 0007187
2021-04-29 10:40 jsantos Status assigned => feedback
2021-04-29 10:40 jsantos Note Edited: 0007187 View Revisions
2021-04-29 10:40 jsantos Note Edited: 0007187 View Revisions
2021-04-29 19:39 ext.mnawrot Note Added: 0007194
2021-04-29 19:39 ext.mnawrot Status feedback => assigned
2021-04-29 19:56 sfernandez Status assigned => feedback
2021-04-29 19:56 sfernandez Note Added: 0007195
2021-04-29 20:22 sfernandez Note Edited: 0007195 View Revisions
2021-04-30 18:42 ext.mnawrot Note Added: 0007201
2021-04-30 18:42 ext.mnawrot Status feedback => assigned