Closed
Bug 571072
Opened 15 years ago
Closed 9 years ago
Cannot get some Unicode characters from a plug-in
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: vlad.alexander, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a5pre) Gecko/20100607 Minefield/3.7a5pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a5pre) Gecko/20100607 Minefield/3.7a5pre
We are having a problem getting some Unicode characters from our plug-in. This could be a bug. Here is our code:
// get keyboard layout
void *kl = NULL;
KeyboardLayoutRef keylo = NULL;
KLGetCurrentKeyboardLayout( &keylo );
if( KLGetKeyboardLayoutProperty( keylo, kKLuchrData,(const void **)&kl) != noErr )
kl = NULL;
if( kl )
UCKeyTranslate( (const UCKeyboardLayout *)kl,((keyCodeMask&ev->message)>>8) & 0xff,kUCKeyActionDown,(ev->modifiers>>8) & 0xff,LMGetKbdType(),kUCKeyTranslateNoDeadKeysMask,&dk,10,&cb, unic );
else
{//cannot get unicode key layout, then try KCHR layout
KLGetKeyboardLayoutProperty( keylo,kKLKCHRData,(const void **)&kl);
if( kl )
{
cb = 0;
unic[0] = KeyTranslate( kl, ( ((keyCodeMask&ev->message)>>8) | (ev->modifiers & 0xff00)), &cb );
if( cb )
{
cb = 0;
unic[0] = KeyTranslate( kl, ( 0x80 | ((keyCodeMask&ev->message)>>8) | (ev->modifiers & 0xff00)), &cb );
}
}
}
Using a Czech keyboard layout, using the modifier keys, we are able to capture some characters. For example, pressing ' followed by "a" works. But pressing ' followed by "s" does not. Pressing " followed by "2" we are getting 2 characters instead of one.
Here is a screen shot of how we do the keyboard input:
http://misc.xstandard.com/mozilla/keyboard.gif
Here is our plug-in:
http://misc.xstandard.com/mozilla/XStandard.plugin.zip
Here is a test page to load the plug-in:
http://xstandard.com/pro.asp
Reproducible: Always
Steps to Reproduce:
1. Install our plug-in from here:
http://misc.xstandard.com/mozilla/XStandard.plugin.zip
2. Load it in a test page:
http://xstandard.com/pro.asp
3. Change the keyboard layout to Czech and open the Keyboard viewer.
4. Press the ' key followed by "s".
Actual Results:
Letter "s" is received.
Expected Results:
Letter "ś".
Updated•15 years ago
|
Component: General → Plug-ins
Product: Firefox → Core
QA Contact: general → plugins
Comment 1•9 years ago
|
||
Resolving old bugs which are likely not relevant any more, since NPAPI plugins are deprecated.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → INCOMPLETE
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•