Keyboard shortcut widget

Hi all, I've got a question about the usage of the Keyboard Shortcut Widget. I'd like to use the 'enter' keyboard shortcut to send a new message.  The 'Verstuur'-button triggers a microflow, which in the first step uses a split to check if a message is added. If the expression is false, an information message is shown.       I used the Keyboard Shortcut widget to trigger the button, but I have an issue. When I type a text en press enter the information message is shown, when I hit the enter-key again my message on the background is sent and added to the chat. When I use the debugger and add a breakpoint on the  Exclusive split, I can see the message is set with the correct value, and when I hit the continue button it works correctly like it should. So even though the value is set correctly, the condition of false is been given. But when hitting the enter key again, the message is been sended on the background.   Anyone know how to fix this? I'm using modeler version 6.10.10. The latest version of the widget is supported for version 6.2.1, so it may have to do something with this.  
2 answers

I took a look at this in my test project in 6.10.10 and cannot reproduce the issue. When I press the enter key, I get the new data in my microflow as expected.

Can you create a test project with the bug and invite me to it? My email is my first name dot last name at Mendix.


Hi Eric,


Thanks for your answer. I managed to get things working. In the situation I described my 'Verstuur'-button was a JavaScriptMicroflowButton-widget. This had 2 functions:


(1) Javascript execution to scroll the chat down to the bottom


(2) Microflow -for sending message- called when pressing the button.


I used the KeyboardShortcut-widget and connected it to the JavaScriptMicroflowButton-widget, to use the enter-key to trigger the 2nd functionality (sending the message). Probably this was the issue. It may not be the cleanest solution, but what worked for me was to seperate the 2 functions:


(1) I kept the JavaScriptMicroflowButton-widget to make the chat scroll down, but set its display to none to make it invisible. And I deleted the microflow on this button.


(2) I added a new Action Button, which called my microflow to send messages. Afterwards, I connected the KeyboardShortcut-widget to this button, and connected it with the enter-key.


With this solution everything works like it should.


Thank you for your answer anyway!