Revision: 5109 http://tigervnc.svn.sourceforge.net/tigervnc/?rev=5109&view=rev Author: ossman_ Date: 2013-05-23 11:46:35 +0000 (Thu, 23 May 2013) Log Message: ----------- Adding normal alphabetic keysyms as ONE_LEVEL did not behave correctly when CapsLock is active, so start using the ALPHABETIC type for those instead.
Modified Paths: -------------- trunk/unix/xserver/hw/vnc/InputXKB.cc Modified: trunk/unix/xserver/hw/vnc/InputXKB.cc =================================================================== --- trunk/unix/xserver/hw/vnc/InputXKB.cc 2013-05-23 11:45:18 UTC (rev 5108) +++ trunk/unix/xserver/hw/vnc/InputXKB.cc 2013-05-23 11:46:35 UTC (rev 5109) @@ -485,6 +485,7 @@ int types[1]; KeySym *syms; + KeySym upper, lower; master = GetMaster(keyboardDev, KEYBOARD_OR_FLOAT); xkb = master->key->xkbInfo->desc; @@ -517,13 +518,28 @@ changes.names.num_keys = 1; } - /* FIXME: Verify that ONE_LEVEL isn't screwed up */ + /* FIXME: Verify that ONE_LEVEL/ALPHABETIC isn't screwed up */ - types[XkbGroup1Index] = XkbOneLevelIndex; + /* + * For keysyms that are affected by Lock, we are better off + * using ALPHABETIC rather than ONE_LEVEL as the latter + * generally cannot produce lower case when Lock is active. + */ + XkbConvertCase(keysym, &lower, &upper); + if (upper == lower) + types[XkbGroup1Index] = XkbOneLevelIndex; + else + types[XkbGroup1Index] = XkbAlphabeticIndex; + XkbChangeTypesOfKey(xkb, key, 1, XkbGroup1Mask, types, &changes.map); syms = XkbKeySymsPtr(xkb,key); - syms[0] = keysym; + if (upper == lower) + syms[0] = keysym; + else { + syms[0] = lower; + syms[1] = upper; + } changes.map.changed |= XkbKeySymsMask; changes.map.first_key_sym = key; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ Tigervnc-commits mailing list Tigervnc-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tigervnc-commits