{"id":175,"date":"2023-12-12T08:50:08","date_gmt":"2023-12-12T08:50:08","guid":{"rendered":"http:\/\/localhost:9090\/?p=175"},"modified":"2024-06-23T03:48:03","modified_gmt":"2024-06-23T03:48:03","slug":"disable-keyboard-touch-pad-in-pop","status":"publish","type":"post","link":"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/","title":{"rendered":"Disable keyboard touch pad in Pop!"},"content":{"rendered":"\n

In the case of convertible laptops the keyboard and touchpad needs to be disabled if the laptop screen is being used as a tablet and you dont want accidental keypresses. This happens automatically on windows but linux and Pop! does not detect the switch which allows it to know that the laptop os being flipped. Some laptops show up this key , some dont.<\/p>\n\n\n\n

ray@pop-os:~\/TabletButton$ xinput list \n\u23a1 Virtual core pointer                    \tid=2\t<\/strong>[master pointer  (3)]\n\u239c   \u21b3 Virtual core XTEST pointer              \tid=4\t[slave  pointer  (2)]\n\u239c   \u21b3 Asus Keyboard                           \tid=9\t[slave  pointer  (2)]\n\u239c   \u21b3 Asus Keyboard                           \tid=11\t[slave  pointer  (2)]\n\u239c   \u21b3 ELAN9008:00 04F3:2FC2                   \tid=12\t[slave  pointer  (2)]\n\u239c   \u21b3 ASUE120D:00 04F3:31FB Mouse             \tid=14\t[slave  pointer  (2)]\n\u239c   \u21b3 ASUE120D:00 04F3:31FB Touchpad          \tid=15\t[slave  pointer  (2)]<\/strong>\n\u239c   \u21b3 input-remapper Asus Keyboard forwarded  \tid=20\t[slave  pointer  (2)]\n\u239c   \u21b3 ERGO M575 Mouse                         \tid=22\t[slave  pointer  (2)]\n\u239c   \u21b3 input-remapper ERGO M575 Mouse forwarded\tid=23\t[slave  pointer  (2)]\n\u23a3 Virtual core keyboard                   \tid=3<\/strong>\t[master keyboard (2)]\n    \u21b3 Virtual core XTEST keyboard             \tid=5\t[slave  keyboard (3)]\n    \u21b3 Video Bus                               \tid=6\t[slave  keyboard (3)]\n    \u21b3 Power Button                            \tid=7\t[slave  keyboard (3)]\n    \u21b3 Sleep Button                            \tid=8\t[slave  keyboard (3)]\n    \u21b3 Asus Keyboard                           \tid=10\t[slave  keyboard (3)]\n    \u21b3 ELAN9008:00 04F3:2FC2 Stylus            \tid=13\t[slave  keyboard (3)]\n    \u21b3 Asus WMI hotkeys                        \tid=16\t[slave  keyboard (3)]\n    \u21b3 Asus Keyboard                           \tid=17\t[slave  keyboard (3)]\n    \u21b3 input-remapper keyboard                 \tid=18\t[slave  keyboard (3)]\n    \u21b3 input-remapper Asus Keyboard forwarded  \tid=19\t[slave  keyboard (3)]\n    \u21b3 input-remapper Asus Keyboard forwarded<\/strong>  \tid=21\t[slave  keyboard (3)]<\/strong><\/code><\/pre>\n\n\n\n

We can find the correct input type by disconnecting and connecting. If you are successful and the keyboard is disabled you need an external usb keyboard to start typing to reattach. So its best to use the below script to experiment which finishes in a certain time and you regain keyboard.<\/p>\n\n\n\n

#!\/bin\/bash\n\n#to disconnect by id\n#disconnect special key\nxinput float 18\n#disconnect main keyboard\nxinput float 19\n#disconnect special key\nxinput float 21\n#disconnect touch pad\nxinput float 15\n\nsleep 10s # Waits 10 seconds. \n#Check if your keyboard and touchpad is disabled\n\n#to reconnecct by id to parent\nxinput reattach 18 3\nxinput reattach 19 3\nxinput reattach 21 3\nxinput reattach 15 2<\/code><\/pre>\n\n\n\n

Create a Gnome Panel applet to do the same. We need a dependency for this<\/p>\n\n\n\n

sudo apt-get install gir1.2-appindicator3-0.1 <\/code><\/pre>\n\n\n\n

Now the script<\/p>\n\n\n\n

#!\/usr\/bin\/python3\n\n# This code is an example for a tutorial on Ubuntu Unity\/Gnome AppIndicators:\n# http:\/\/candidtim.github.io\/appindicator\/2014\/09\/13\/ubuntu-appindicator-step-by-step.html\n# https:\/\/gist.github.com\/candidtim\/7290a1ad6e465d680b68\n\nimport os\nimport signal\nimport json\nimport subprocess\n\nimport gi\ngi.require_version('Gtk', '3.0') \nfrom gi.repository import Gtk as gtk\nfrom gi.repository import AppIndicator3 as appindicator\nfrom gi.repository import Notify as notify\n\n\n\nAPPINDICATOR_ID = 'tabletmodeindicator'\n\ndef main():\n    indicator = appindicator.Indicator.new(APPINDICATOR_ID, os.path.abspath('\/home\/surajitray\/TabletButton\/tablet.svg<\/strong>'), appindicator.IndicatorCategory.SYSTEM_SERVICES)\n    indicator.set_status(appindicator.IndicatorStatus.ACTIVE)\n    indicator.set_menu(build_menu())\n    notify.init(APPINDICATOR_ID)\n    gtk.main()\n\ndef build_menu():\n    menu = gtk.Menu()\n\n    item_tbmode = gtk.MenuItem('TabletMode')\n    item_tbmode.connect('activate', tbmode)\n    menu.append(item_tbmode)\n\n\n    item_lpmode = gtk.MenuItem('LaptopMode')\n    item_lpmode.connect('activate', lpmode)\n    menu.append(item_lpmode)\n\n    item_quit = gtk.MenuItem('Quit')\n    item_quit.connect('activate', quit)\n    menu.append(item_quit)\n\n    menu.show_all()\n    return menu\n\ndef tbmode(_):\n    subprocess.call(\"\/home\/surajitray\/TabletButton<\/strong><\/strong>\/keyboardtouchpaddisable.sh<\/strong>\", shell=True)\n    return tbmode\n\ndef lpmode(_):\n    subprocess.call(\"\/home\/surajitray\/TabletButton<\/strong><\/strong>\/keyboardtouchpadenable.sh<\/strong>\", shell=True)\n    return lpmode\n\ndef quit1(_):\n    notify.uninit()\n    gtk.main_quit()\n\nif __name__ == \"__main__\":\n    signal.signal(signal.SIGINT, signal.SIG_DFL)\n    main()<\/code><\/pre>\n\n\n\n

The scripts are below<\/p>\n\n\n\n

keyboardtouchpaddisable.sh<\/strong><\/p>\n\n\n\n

#!\/bin\/bash\n\nxinput float 18\nxinput float 19\nxinput float 21\nxinput float 15<\/code><\/pre>\n\n\n\n

keyboardtouchpaddisable.sh<\/strong><\/p>\n\n\n\n

#!\/bin\/bash\n\nxinput reattach 18 3\nxinput reattach 19 3\nxinput reattach 21 3\nxinput reattach 15 2<\/code><\/pre>\n\n\n\n

You can use any svg for the image : \/home\/surajitray\/TabletButton\/tablet.svg<\/strong>, just make sure the image and path are correct. Now you can put this item in the startup applications<\/p>\n\n\n\n

<\/p>\n\n\n\n

\"\"<\/figure>\n","protected":false},"excerpt":{"rendered":"

In the case of convertible laptops the keyboard and touchpad needs to be disabled if the laptop screen is being used as a tablet and you dont want accidental keypresses. This happens automatically on windows but linux and Pop! does… <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"yoast_head":"\nDisable keyboard touch pad in Pop! - Ray Sayz<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Disable keyboard touch pad in Pop! - Ray Sayz\" \/>\n<meta property=\"og:description\" content=\"In the case of convertible laptops the keyboard and touchpad needs to be disabled if the laptop screen is being used as a tablet and you dont want accidental keypresses. This happens automatically on windows but linux and Pop! does…\" \/>\n<meta property=\"og:url\" content=\"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/\" \/>\n<meta property=\"og:site_name\" content=\"Ray Sayz\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-12T08:50:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-23T03:48:03+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/localhost:9090\/wp-content\/uploads\/2023\/12\/image-1024x717.png\" \/>\n<meta name=\"author\" content=\"raysayz\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"raysayz\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t \"@context\": \"https:\/\/schema.org\",\n\t \"@graph\": [\n\t {\n\t \"@type\": \"Article\",\n\t \"@id\": \"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/#article\",\n\t \"isPartOf\": {\n\t \"@id\": \"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/\"\n\t },\n\t \"author\": {\n\t \"name\": \"raysayz\",\n\t \"@id\": \"http:\/\/localhost:9090\/#\/schema\/person\/00e3de6ea3cf1408f8378a99a51d1ed9\"\n\t },\n\t \"headline\": \"Disable keyboard touch pad in Pop!\",\n\t \"datePublished\": \"2023-12-12T08:50:08+00:00\",\n\t \"dateModified\": \"2024-06-23T03:48:03+00:00\",\n\t \"mainEntityOfPage\": {\n\t \"@id\": \"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/\"\n\t },\n\t \"wordCount\": 178,\n\t \"publisher\": {\n\t \"@id\": \"http:\/\/localhost:9090\/#\/schema\/person\/00e3de6ea3cf1408f8378a99a51d1ed9\"\n\t },\n\t \"image\": {\n\t \"@id\": \"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/#primaryimage\"\n\t },\n\t \"thumbnailUrl\": \"http:\/\/localhost:9090\/wp-content\/uploads\/2023\/12\/image-1024x717.png\",\n\t \"articleSection\": [\n\t \"Linux\"\n\t ],\n\t \"inLanguage\": \"en-US\"\n\t },\n\t {\n\t \"@type\": \"WebPage\",\n\t \"@id\": \"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/\",\n\t \"url\": \"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/\",\n\t \"name\": \"Disable keyboard touch pad in Pop! - Ray Sayz\",\n\t \"isPartOf\": {\n\t \"@id\": \"http:\/\/localhost:9090\/#website\"\n\t },\n\t \"primaryImageOfPage\": {\n\t \"@id\": \"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/#primaryimage\"\n\t },\n\t \"image\": {\n\t \"@id\": \"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/#primaryimage\"\n\t },\n\t \"thumbnailUrl\": \"http:\/\/localhost:9090\/wp-content\/uploads\/2023\/12\/image-1024x717.png\",\n\t \"datePublished\": \"2023-12-12T08:50:08+00:00\",\n\t \"dateModified\": \"2024-06-23T03:48:03+00:00\",\n\t \"breadcrumb\": {\n\t \"@id\": \"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/#breadcrumb\"\n\t },\n\t \"inLanguage\": \"en-US\",\n\t \"potentialAction\": [\n\t {\n\t \"@type\": \"ReadAction\",\n\t \"target\": [\n\t \"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/\"\n\t ]\n\t }\n\t ]\n\t },\n\t {\n\t \"@type\": \"ImageObject\",\n\t \"inLanguage\": \"en-US\",\n\t \"@id\": \"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/#primaryimage\",\n\t \"url\": \"http:\/\/localhost:9090\/wp-content\/uploads\/2023\/12\/image.png\",\n\t \"contentUrl\": \"http:\/\/localhost:9090\/wp-content\/uploads\/2023\/12\/image.png\",\n\t \"width\": 2024,\n\t \"height\": 1417\n\t },\n\t {\n\t \"@type\": \"BreadcrumbList\",\n\t \"@id\": \"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/#breadcrumb\",\n\t \"itemListElement\": [\n\t {\n\t \"@type\": \"ListItem\",\n\t \"position\": 1,\n\t \"name\": \"Home\",\n\t \"item\": \"http:\/\/localhost:9090\/\"\n\t },\n\t {\n\t \"@type\": \"ListItem\",\n\t \"position\": 2,\n\t \"name\": \"Disable keyboard touch pad in Pop!\"\n\t }\n\t ]\n\t },\n\t {\n\t \"@type\": \"WebSite\",\n\t \"@id\": \"http:\/\/localhost:9090\/#website\",\n\t \"url\": \"http:\/\/localhost:9090\/\",\n\t \"name\": \"Ray Sayz\",\n\t \"description\": \"Nowhere, everywhere ... now\",\n\t \"publisher\": {\n\t \"@id\": \"http:\/\/localhost:9090\/#\/schema\/person\/00e3de6ea3cf1408f8378a99a51d1ed9\"\n\t },\n\t \"potentialAction\": [\n\t {\n\t \"@type\": \"SearchAction\",\n\t \"target\": {\n\t \"@type\": \"EntryPoint\",\n\t \"urlTemplate\": \"http:\/\/localhost:9090\/?s={search_term_string}\"\n\t },\n\t \"query-input\": \"required name=search_term_string\"\n\t }\n\t ],\n\t \"inLanguage\": \"en-US\"\n\t },\n\t {\n\t \"@type\": [\n\t \"Person\",\n\t \"Organization\"\n\t ],\n\t \"@id\": \"http:\/\/localhost:9090\/#\/schema\/person\/00e3de6ea3cf1408f8378a99a51d1ed9\",\n\t \"name\": \"raysayz\",\n\t \"image\": {\n\t \"@type\": \"ImageObject\",\n\t \"inLanguage\": \"en-US\",\n\t \"@id\": \"http:\/\/localhost:9090\/#\/schema\/person\/image\/\",\n\t \"url\": \"http:\/\/localhost:9090\/wp-content\/uploads\/2024\/06\/raysayz_upscaled.png\",\n\t \"contentUrl\": \"http:\/\/localhost:9090\/wp-content\/uploads\/2024\/06\/raysayz_upscaled.png\",\n\t \"width\": 800,\n\t \"height\": 800,\n\t \"caption\": \"raysayz\"\n\t },\n\t \"logo\": {\n\t \"@id\": \"http:\/\/localhost:9090\/#\/schema\/person\/image\/\"\n\t },\n\t \"sameAs\": [\n\t \"http:\/\/localhost:9090\"\n\t ],\n\t \"url\": \"http:\/\/localhost:9090\/author\/raysayz\/\"\n\t }\n\t ]\n\t}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Disable keyboard touch pad in Pop! - Ray Sayz","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/","og_locale":"en_US","og_type":"article","og_title":"Disable keyboard touch pad in Pop! - Ray Sayz","og_description":"In the case of convertible laptops the keyboard and touchpad needs to be disabled if the laptop screen is being used as a tablet and you dont want accidental keypresses. This happens automatically on windows but linux and Pop! does…","og_url":"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/","og_site_name":"Ray Sayz","article_published_time":"2023-12-12T08:50:08+00:00","article_modified_time":"2024-06-23T03:48:03+00:00","og_image":[{"url":"http:\/\/localhost:9090\/wp-content\/uploads\/2023\/12\/image-1024x717.png"}],"author":"raysayz","twitter_card":"summary_large_image","twitter_misc":{"Written by":"raysayz","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/#article","isPartOf":{"@id":"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/"},"author":{"name":"raysayz","@id":"http:\/\/localhost:9090\/#\/schema\/person\/00e3de6ea3cf1408f8378a99a51d1ed9"},"headline":"Disable keyboard touch pad in Pop!","datePublished":"2023-12-12T08:50:08+00:00","dateModified":"2024-06-23T03:48:03+00:00","mainEntityOfPage":{"@id":"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/"},"wordCount":178,"publisher":{"@id":"http:\/\/localhost:9090\/#\/schema\/person\/00e3de6ea3cf1408f8378a99a51d1ed9"},"image":{"@id":"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/#primaryimage"},"thumbnailUrl":"http:\/\/localhost:9090\/wp-content\/uploads\/2023\/12\/image-1024x717.png","articleSection":["Linux"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/","url":"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/","name":"Disable keyboard touch pad in Pop! - Ray Sayz","isPartOf":{"@id":"http:\/\/localhost:9090\/#website"},"primaryImageOfPage":{"@id":"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/#primaryimage"},"image":{"@id":"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/#primaryimage"},"thumbnailUrl":"http:\/\/localhost:9090\/wp-content\/uploads\/2023\/12\/image-1024x717.png","datePublished":"2023-12-12T08:50:08+00:00","dateModified":"2024-06-23T03:48:03+00:00","breadcrumb":{"@id":"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/#primaryimage","url":"http:\/\/localhost:9090\/wp-content\/uploads\/2023\/12\/image.png","contentUrl":"http:\/\/localhost:9090\/wp-content\/uploads\/2023\/12\/image.png","width":2024,"height":1417},{"@type":"BreadcrumbList","@id":"http:\/\/localhost:9090\/disable-keyboard-touch-pad-in-pop\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/localhost:9090\/"},{"@type":"ListItem","position":2,"name":"Disable keyboard touch pad in Pop!"}]},{"@type":"WebSite","@id":"http:\/\/localhost:9090\/#website","url":"http:\/\/localhost:9090\/","name":"Ray Sayz","description":"Nowhere, everywhere ... now","publisher":{"@id":"http:\/\/localhost:9090\/#\/schema\/person\/00e3de6ea3cf1408f8378a99a51d1ed9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/localhost:9090\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"http:\/\/localhost:9090\/#\/schema\/person\/00e3de6ea3cf1408f8378a99a51d1ed9","name":"raysayz","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/localhost:9090\/#\/schema\/person\/image\/","url":"http:\/\/localhost:9090\/wp-content\/uploads\/2024\/06\/raysayz_upscaled.png","contentUrl":"http:\/\/localhost:9090\/wp-content\/uploads\/2024\/06\/raysayz_upscaled.png","width":800,"height":800,"caption":"raysayz"},"logo":{"@id":"http:\/\/localhost:9090\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/localhost:9090"],"url":"http:\/\/localhost:9090\/author\/raysayz\/"}]}},"_links":{"self":[{"href":"http:\/\/localhost:9090\/wp-json\/wp\/v2\/posts\/175"}],"collection":[{"href":"http:\/\/localhost:9090\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/localhost:9090\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/localhost:9090\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/localhost:9090\/wp-json\/wp\/v2\/comments?post=175"}],"version-history":[{"count":3,"href":"http:\/\/localhost:9090\/wp-json\/wp\/v2\/posts\/175\/revisions"}],"predecessor-version":[{"id":179,"href":"http:\/\/localhost:9090\/wp-json\/wp\/v2\/posts\/175\/revisions\/179"}],"wp:attachment":[{"href":"http:\/\/localhost:9090\/wp-json\/wp\/v2\/media?parent=175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/localhost:9090\/wp-json\/wp\/v2\/categories?post=175"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/localhost:9090\/wp-json\/wp\/v2\/tags?post=175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}