Hi,
Here's my plugin's code wich detect if backspace key is pressed:
It works when backspace key is pressed then released (ex: when I delete a string character by character).
But it doesn't work anymore if I hold down the backspace key (onKeyPressed).
How can I detect if the backspace key is hold down ?
PLease help.
Here's my plugin's code wich detect if backspace key is pressed:
var onKey = function( event )
{
switch ( event.data.keyCode )
{
case 8 : // BACKSPACE
//code...
}
};
CKEDITOR.plugins.add('detectbackspace',
{
init: function(editor)
{
var pluginName = 'detectbackspace';
editor.on( 'key', onKey, editor );
}
});It works when backspace key is pressed then released (ex: when I delete a string character by character).
But it doesn't work anymore if I hold down the backspace key (onKeyPressed).
How can I detect if the backspace key is hold down ?
PLease help.

Re: Detect if the backspace key is hold down ?
Re: Detect if the backspace key is hold down ?
Re: Detect if the backspace key is hold down ?
But please could you show me how to get the native event, I'm lost.
I spend 3 days on it (check the doc) but I still don't know how to make
it works in my plugin.
Thanks for advance.
Re: Detect if the backspace key is hold down ?
and the available methods of event.$ are:
name value :key sender value :[object Object] editor value :[object Object] data value :[object Object] listenerData value :undefined stop value :function () { d = true; } cancel value :function () { f = true; } removeListener value :function () { l.removeListener(d, e); }What method is supposed to give me the type of the event ?
Are you sure it's possible ?
Re: Detect if the backspace key is hold down ?
You need to setup your native listener and then you'll be able to read the event.$
Re: Detect if the backspace key is hold down ?
I tried but I really don't know how to setup my native listener (too few indications in the doc).
So could you please give me a piece of code or something that makes me get it ?
Thanks for advance.
Re: Detect if the backspace key is hold down ?
http://unixpapa.com/js/key.html