<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Successfully removing keys from the Qt virtual keyboard, sort of.]]></title><description><![CDATA[<p dir="auto">The following code allows me to remove the emoticons key and the language key from the keyboard:</p>
<pre><code>        property var keyboardLayout: virtualKeyboard.keyboard.layout
        
        function disableKey(parent, objectText) {
            var obj = null
            if (parent === null)
                return null
            var children = parent.children
            for (var i = 0; i &lt; children.length; i++) {
                obj = children[i]
                if (obj.text === objectText &amp;&amp; obj.toString().substring(0, 7) === "BaseKey") {
                    obj.enabled = false
                    obj.visible = false
                }
                obj = disableKey(obj, objectText)
                if (obj)
                    break
            }
            return obj
        }
        
        function findChildByProperty(parent, propertyName, propertyValue, compareCb) {
            var obj = null
            if (parent === null)
                return null
            var children = parent.children
            for (var i = 0; i &lt; children.length; i++) {
                obj = children[i]
                if (obj.hasOwnProperty(propertyName)) {
                    if (compareCb !== null) {
                        if (compareCb(obj[propertyName], propertyValue))
                            break
                    } else if (obj[propertyName] === propertyValue) {
                        break
                    }
                }
                obj = findChildByProperty(obj, propertyName, propertyValue, compareCb)
                if (obj)
                    break
            }
            return obj
        }
        
        onKeyboardLayoutChanged: {
            if(keyboardLayout !== ""){
                var ChangeLanguageKey= findChildByProperty(virtualKeyboard.keyboard, "objectName", "changeLanguageKey", null)
                if(ChangeLanguageKey){
                    ChangeLanguageKey.visible=false
                }
                if (keyboardLayout !== "") {
                    disableKey(virtualKeyboard.keyboard, ':-)')
                }
            }
        }
</code></pre>
<p dir="auto">sort of... The problem is that both keys will return when I click the &amp;123 key and then click the 1/2 key. I believe that is the shift key on the alternative keys page. Would it be possible to eliminate the language key and the emoticon key completely? Is there a better way to remove keys?</p>
]]></description><link>https://forum.qt.io/topic/105694/successfully-removing-keys-from-the-qt-virtual-keyboard-sort-of</link><generator>RSS for Node</generator><lastBuildDate>Thu, 14 May 2026 16:24:35 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/105694.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 06 Aug 2019 14:06:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Successfully removing keys from the Qt virtual keyboard, sort of. on Tue, 06 Aug 2019 19:13:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/circuits">@<bdi>circuits</bdi></a><br />
yes, i am not aware of another way to achieve this</p>
]]></description><link>https://forum.qt.io/post/544982</link><guid isPermaLink="true">https://forum.qt.io/post/544982</guid><dc:creator><![CDATA[raven-worx]]></dc:creator><pubDate>Tue, 06 Aug 2019 19:13:05 GMT</pubDate></item><item><title><![CDATA[Reply to Successfully removing keys from the Qt virtual keyboard, sort of. on Tue, 06 Aug 2019 18:23:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/raven-worx">@<bdi>raven-worx</bdi></a> Yes I have read that before. It seems to suggest that I would need to import all 43 layouts (if I want each language) and customize them each individually, is that correct?</p>
]]></description><link>https://forum.qt.io/post/544981</link><guid isPermaLink="true">https://forum.qt.io/post/544981</guid><dc:creator><![CDATA[Circuits]]></dc:creator><pubDate>Tue, 06 Aug 2019 18:23:32 GMT</pubDate></item><item><title><![CDATA[Reply to Successfully removing keys from the Qt virtual keyboard, sort of. on Tue, 06 Aug 2019 17:04:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/circuits">@<bdi>circuits</bdi></a><br />
<a href="https://doc.qt.io/qt-5/technical-guide.html#adding-custom-layouts" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/technical-guide.html#adding-custom-layouts</a></p>
]]></description><link>https://forum.qt.io/post/544973</link><guid isPermaLink="true">https://forum.qt.io/post/544973</guid><dc:creator><![CDATA[raven-worx]]></dc:creator><pubDate>Tue, 06 Aug 2019 17:04:37 GMT</pubDate></item></channel></rss>