I wanted to make a software with Godot in GDScript that advice you when pressing the bloq mayus button changing the color of the taskbar icon. But, I couldn't find any special code or something that makes it.
I saw the video of Adderly Cespedes making the same software (but in gamemaker) and he said that he found a special extension for it but never said the name.
This isn't currently possible in Godot.
The engine doesn't allow you to map Caps Lock (bloq mayus) to an input.
Edit: From Calinou’s comment, OS.request_attention() can be used to flash the taskbar.
Related
While there is a WebAIM guideline on keyboard accessibility, I was unable to find any guidelines - or even recommendations - about how to convey the existence of custom keyboard shortcuts to sighted people.
For screen reader users like myself it is simple enough:
<input type="submit" aria-keyshortcuts="Alt+S" value="Send" />
A screen reader would then announce "Send button Alt plus S" and the keyboard shortcut would also be apparent for braille display users.
Sighted users who cannot or do not want to use the mouse, however, need a simple indicator of which keyboard shortcuts are available on a given control so that they have a similar user experience and don't have to search for lists of keyboard shortcuts in separate documentation. (Such lists are, of course, important, but they shouldn't be the only way for sighted users to know which keyboard shortcuts they can use.)
Can you provide me with resources or suggestions how to visually indicate available keyboard shortcuts?
The guidance for aria-keyshortcuts says:
Authors SHOULD provide a way to expose keyboard shortcuts so that all users may discover them, such as through the use of a tooltip.
which is essentially what you're asking about. You know you should convey the information to all users but how should that info be conveyed? A tooltip, as suggested in the spec, is one possibility but only if that tooltip is exposed for keyboard users too. Currently, a tooltip (title attribute) is only displayed upon mouse hover with Firefox and Chrome (not sure about Safari). Say what you will about Internet Explorer but IE would display the tooltip upon keyboard focus so that's a great feature. That feature was carried forward into Edge as well.
So you can use a tooltip but would still need another way to convey that information for all users. If space allows, I often see the keyboard hint as text right on the page. Ideally, the hint is near the element it applies to but if there are several shortcut keys, then having a section with all the keys listed might be a better option. Have an appropriate <h#> element for that section to make it easier to find with a screen reader.
Note that using the accesskey attribute for the shortcut key will automatically be announced by screen readers so you wouldn't need aria-keyshortcuts. But that attribute only allows a simple letter and would still have the issue of it not being conveyed to sighted keyboard users. Browsers should automatically display a tooltip for an element with an accesskey but sadly they don't.
Another alternative is suggested in this answer, How to display a specific shortcut key in HTML?. Look at the CSS solution (link should go directly to that answer) but instead of referring to accesskey in the CSS, refer to aria-keyshortcuts. (Ignore the javascript part of that answer.)
Trying to use AndroidStudio (3.4.2) for the first time and it appers to be substantially different to the tutorial at
https://developer.android.com/training/basics/firstapp/building-ui
For example:
There is no layout editor toolbar let alone a show button.
There is no autoconnect button
It doesn't show any wiggly lines from the middle of the blue square to its edges.
When adding a text box it goes to the top left and can't be moved.
WTF is going on? This is awful!
So I know this may sound like the hard answer, but in the long run it will make life 1000x easier.
You need to learn XML to design the activities. It's fairly simple and really easy to research. The reason the textbox can't be moved is because the default layout is ConstraintLayout. In order to fix this, go to the xml file and change the Constraint layout to either Relative layout or Linear Layout. In the end, its more simple to learn straight xml.
I suggest you learn Android programming from here or somewhere else because the Android documentation can be confusing especially for a beginner like yourself and trust me, I've been there.
I love the mod4 + mouse-drag combo for moving/resizing windows in Awesome WM, it's very intuitive with regular mouse. Now that I'm using Awesome WM on my laptop, however, I find this combo more annoying when using the touchpad vs regular mouse.
The problem stems from the fact that I now need 3 fingers to perform a gesture that I could do with 2 before (1 to move on the touchpad, 1 to keep on the left-click at all times, and one on mod4). Alternatively, I can apply more force to the touchpad and have it pressed as I drag my finger, which is not any better since it puts a lot of stress on the finger doing the dragging).
What I would like to do instead is have awesome treat left-mouse button as pressed if both of the following conditions are met:
mod4 is pressed
movement event is coming from touchpad and not regular mouse
To do so, however, I need to be able to detect that the movement is coming from the touchpad. Is there a way to do so in Awesome WM/Linux? I've looked through the keysyms (http://wiki.linuxquestions.org/wiki/List_of_keysyms) but don't see anything for the mouse. I've also looked at the mouse.lua file in Awesome WM but it doesn't seem to have anything to differentiate between the two either (https://github.com/awesomeWM/awesome/blob/master/lib/awful/mouse/init.lua). If there is a way to tell that the last coordinate change came from a touchpad on Linux that would resolve the issue as I could simply create a lua file to run such check whenever Mod4 is pressed.
To do so, however, I need to be able to detect that the movement is coming from the touchpad. Is there a way to do so in Awesome WM/Linux?
Nope, there is no such way in AwesomeWM. Sorry.
In X11, this is possible via the input extension. However, awesome does not use that extension.
While my search for a Python debugger on Emacs remains unfulfilled, I am giving PyCharm CE a test drive.
Already on my second day I'm encountering a trivial but frustrating point. Is it possible to set the background to be pitch black in just one place?
A program written by programmers for programmers should certainly have included a feature such as "change the background for Docstrings, Comments, Keywords, ... the whole shebang" to black, but I don't see it.
I understand of course that some parts of the UI will stubbornly refuse to change, and I'm OK with that, just so long as the Python code itself appears on a pure black background.
The Twilight and Mokokai themes come close, but their backgrounds still leave ample "contrast room" that could be used by darkening the background color.
(How do we get from left to right... err.. I mean.. how do we get darker than we are.. um, wait... Isn't the version on the right so much easier on the eye.. but anyway, how can we do it?)
Update
The exact same problem and solution apply to Android Studio.
In File > Settings:
Go to Editor > Colors & Fonts > General
Choose the theme you want to modify (will likely need to Save As... your own as you can't modify the default color schemes.
Go to the Text > Default Text colors and change the background to black. The only ones that won't be affected are the syntax highlighters that define their own background (usually select/highlight/errors/etc.)
I'd like to write a Linux screen magnifier that's customized to my liking. Ideally, the magnified window would be a square about 150 pixels wide that follows the mouse cursor wherever it goes.
Is it possible to do this in X11? Would it be easier to have an application window that follows the mouse around, or would it be better (or possible) to forget about the window altogether and just make the mouse pointer a 150x150 square that magnifies whatever's underneath?
Look at the source to xeyes?
This actually already exists, it's called Xmag (do a Google search for additional info). You might want to check out the source code for it if you want to know how it works.
EDIT: looks like I misread your question a little bit... if you want a magnified square to follow the mouse pointer around, I suppose it should be possible, but I don't know the technical details of how you'd do it. Regardless, the place to start is probably by looking at Xmag as a starting point.
I am unsure if this can run as its own app or would have to be integrated into your window manager. Either way, you would need libx11 (might have a different name from distro to distro). Also, I would suggest taking a look at swarp. I know this is not even close to what you are talking about, but the source code is only 35 lines and it shows what can be done with libx11.
I would personally make that a frameless window that always stays atop with a 1px hole in the middle. The events that the user makes (Mouse clicks, keypresses, whatever) is passed to the window below.
And when the user moves it's cursor it is ought to be visible to your window and you just move it over a bit. For the magnifying part, well - that is left as an exercise to the reader (Because I do not know how to do that as of yet ;-).
Texworks comes with such a feature to inspect the pdf resulting from typesetting a latex source. You can also choose between a square or a circular magnifier. See https://www.tug.org/texworks/ for access to the code which can serve a launchpad.