switch-layout | simple script to fix keyboard
kandi X-RAY | switch-layout Summary
kandi X-RAY | switch-layout Summary
This is a workaround for keyboard layout switching bug, which occurs, as far as I know, on some Gnome 3 based DEs running on X server, including Pantheon (elementary OS DE). According to some of the reports I've read, it affects mostly users of Russian keyboard layout. The bug is this: there is an annoying delay between the moment you try to switch layout (either with a shortcut or with the GUI) and the moment the layout is switched. In my case, it's around 1 second when switching from RU to EN. Sometimes the layout doesn't switch at all! This bug makes it impossible to type text both in Russian and English quickly. This workaround made things easier for me. It's not ideal, but it reduces the delay far enough to make it barely noticable.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Handle key press event
- Switch the current layout
- Checks if the current key is a switch shortcut
- Release key
- Format a key
switch-layout Key Features
switch-layout Examples and Code Snippets
Community Discussions
Trending Discussions on switch-layout
QUESTION
I'm creating a Dashboard like application. I'd like to achieve the following layout plan in Angular (2+):
- route - name - layout
- / - home page - full width layout with tables and charts, etc
- /reports - reports page - same full width layout with more tables, etc
- /login - login page - no full width layout, just a simple login form at screen center
- /signup - signup page - no full width layout, just a simple signup form at screen center
- /messages - emails - full width layout
- /messages/new - new email - medium layout, not inheriting from full width layout
etc...
So basically what I'd like to do is to completely replace the contents of at some (child) routes.
This is not good for me: multiple layout for different pages in angular 2 because I don't want to redirect / (root) to anywhere like /home.
This one doesn't fit either: How to switch layouts in Angular2
Any help would be great!
...ANSWER
Answered 2017-Feb-16 at 20:21Ok I am going to give this a shot...
Routes
Creating routes can be done in multiple ways. You can use child routes or serve the component up directly.
If you want to serve the component up directly this would be ideal,
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install switch-layout
Install pynput - the script uses it to listen for key presses.
Copy the switch-layout.py somewhere in your home folder.
Edit the SWITCH_SHORTCUTS and LAYOUTS_COUNT at the top of the script accordingly to your needs.
Disable built-in layout-switch shortcut in your system, so it wouldn't interfere with the script. Also disable CapsLock default behavior in case you use it as switch key.
Run the script: python3 switch-layout.py. Try pressing the shortcut and see if it works. If it doesn't, feel free to open an issue. Maybe I'll be able to help. Press Ctrl+C to stop the script.
If it works, you can add this script to autostart programs in your DE to make it start automatically.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page