DataTables YADCF - do not search on arrow key presses - datatables

I am looking at this YADCF example:
http://yadcf-showcase.appspot.com/server_side_source.html
Position cursor inside "Browser" column filter field
Press LEFT ARROW key
In Firebug you will notice an outgoing request to pull the data.
Question.
How can I prevent submission of search context if arrow keys are pressed?
Looking at the YADCF source I could not find an appropriate spot. function textKeyUP is triggered by inline JS events and does not know anything about Javascript Event object.
Thanks!

You can grab the 0.8.9.beta.33 in this version the text and auto complete filtes will ignore the arrow keys, if someone want more key to be igore he can send a PR with modified keyCodes

Related

Handle Enter key in CoreUI's CInput control

My Vue.js view consists of a single CInput and a single send button (CButton). As a comfort feature, I want to trigger the send method, when the user hits the Enter key as long as the text input has focus. According to the official documentation, only the #input, #update:value and #change events can be used by this control. But I haven't found any clue about the pressed key.
I tried using the #input handler, which offers two arguments. The first one is the new value itself, and the second one is an event argument, but I can't find any hint of a key code there.
How can I find out, which key the user pressed and call my send method in case of the Enter key (keycode 13)?
v-on:keypress.enter="your method"

Input type search clear button Microsoft Edge not working properly with Datatables

I am using Datatables to sort and filter my tables. When you activate Datatables, there is a search field. In Chrome, Firefox, Edge and Internet Explorer 11 there is a clear button present with every search input field.
When you click on it, the text is cleared and the table will reset. Except in Microsoft Edge, this does not work. The table is not resetting.
Is this an issue with Microsoft Edge or Datatables?
I believe it is Edge that not is triggering the events the DT input is listening on. That is keyup, keydown, keypress, cut and paste ...There is two additional events that is fired when you click on the search input clear button: mousedown and mouseup.
You could create event handler that force a redraw when mouseup is triggered :
$('.dataTables_filter input').on('mouseup', function() {
table.draw()
})
See this question where the issue is discussed more thoroughly -> Event fired when clearing text input on IE10 with clear icon
This is a known bug found in build 17.17134 of Edge.
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/17584515/
I am using an earlier version and it still works.
I try to make a test on my side with EDGE and got the same result like yours.
When click on 'X' it is not reset the table.
Click here to see testing result
Then i made some other tests and find that if you use BackSpace key to clear the search text then it will work as expected.
If you use 'X' button then after text get clear you need to press enter to reset the data.
I agree with other community members that Edge is not triggering the event to reset data.
I think you need to submit your feedback to Datatables site. So that they modify their code which can work properly with Edge.
Regards
Deepak

Userform design time: Move controls with arrowkeys

Is there any way to arrange the controls in the userform using only arrowkeys (not dragging) ?
The Designer does not seem to support this and the form does not seem to capture Arrow Keys as key press events.
I have tried hacking this together with number keys but it will not keep the values of where the element was placed and does not work inside any control that actually accepts input.
So I think the answer is No you cannot use the arrow keys to move controls.

Activate dojo dgrid editor using keyboard

Triggering edit mode in dojo dgrid with mouse event is easy. Here's what I have done:
editor({field: "checkNumber",label: "Check Number",editOn: "click"})
However, i want to trigger edit mode using keyboard. Specifically, i want to go into edit mode when I press the space key. How can I programmatically set a cell to 'edit mode' or 'non-edit mode'?
When you add one or more editor columns to a grid, it makes the edit method available on the grid instance, which you can call with a cell element (or event referencing one) to programmatically shift focus to the editor for the cell.
Meanwhile, the Keyboard mixin has an addKeyHandler method which you can use to add handlers to respond to keydown events for particular keys.
Combining these two things, you can easily do the following to cause the grid to edit the focused cell when space is pressed:
grid.addKeyHandler(32, function (event) {
grid.edit(event);
});
(edit should have no effect for cells in non-editor columns.)
An alternative solution could be to create an extension event which triggers either on mouse click or on space keypress, and pass that to editOn instead of 'click'.
var grdobj = dijit.byId("...");
var editCell=grdobj.cell(rowNo, "checkNumber");
grdobj.edit(editCell);
Instead of cell function, you could make use of right, left, up, or down functions.
Hope that helps.

Word VBA event for detecting text change in the document?

I'm working on a macro for Word which detects key words in the text while these are typed.
for example, I want that a Table will be added when the user types \table or something like that.. very similar to lyx context, but yet nothing like it.
The table example is very simple compare to the ideas I want to implement with this.
I'm looking for an event in VBA that will be triggered whenever the used types something.
There is an event called WindowSelectionChange (Reference: Event - Document Edited) but it triggers only whenever the SELECTION is changed, meaning only when the user selects another area in the document with the mouse cursor, or whenever the user moves with the keyboard arrows in the document, but doesn't triggers when the user types text (or press Enter, Space, etc...).
Seems an answer is explained here:
What events can I use to monitor users typing in Word?
Shortly - no events on type text in word: use either Windows API hooks, or assign key bindings to all keys.