Removing access to WIN+L keyboard shortcut - keyboard

In using AutoHotKey to block access to ALL keys, all keyboard shortcuts do stop working and the windows key on its own can be blocked i.e.
LWin::Return
RWin::Return
also all other keyboard shortcuts are blocked, however windows + L seems to operate on a higher level and works regardless.

I'm not sure if Autohotkey actually can disable the win+L combination, but it can be done through the registry. Here are detailed instructions: How to Disable the Lock Screen Shortcut Key (Win + L) in Windows.
To summarize:
In the registry editor, navigate to this key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies.
Add a new key, "System", in "Policies".
In your newly created "System" key, add a new "DWORD (32-bit) Value".
Name the value “DisableLockWorkstation” and set its value data to "1".
Log off/on or restart.
Note that I haven't verified if this works. Also note that the linked instructions also includes steps to disable all WinKey combos if that is your desire.

Related

Tkinter vs Linux (ubuntu/Mint) <KP_Enter> not enabled by default

On Windows the events of the 'Return' key by default are already linked to the <KP_Enter> key. For example selecting a combobox item, or closing a mesagebox
Here I use Linux Mint x64 Cinnamon 20.2, based on Ubuntu. And the <KP_Enter> key is not linked to the events of the 'Return' key. Is this a bug? Or I need to do some configuration.
example if I try to select an item from the combobox with Enter, it works. But if I press <KP_Enter> (numeric enter) nothing happens
If this is a bug, where can I report it?
Key Pad Enter (KP_Enter) does not work on Ubuntu. Let me know if you find an alternative.
This is the archived list of predefined events and it is listed. Again, if there is an alternative let us know.
https://web.archive.org/web/20190512164300id_/http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/event-types.html
from my knowledge of free pascal programming
in windows : Enter(or return key) is mapped to one key VK_RETURN
in Linux : Enter is mapped to 2 keys
for keypad(numeric) to XK_KP_Enter
for left return XK_RETURN

using Autohotkey on windows 10 allows window key to open start menu

I've got some AutoHotKey scripts that I use to move windows around my monitors. for example, I have [Shift]+[Win]+[Up] set to move the current window to the monitor above the current one ans size proportionally
My problem is that, since upgrading to windows 10 on Friday, executing one of these functions still performs its hotkey action, but then when I release the Shift key while still holding Window, the start menu opens. When I was still on 7, the start menu would only open if I pressed and released the Window key without pressing any other keys.
I don't have this problem with my hotkeys that use Control+Window instead of Shift. It's only when I press and release the Shift key while holding Window.
How can I fix this?
If your hotkey sends any keys other than LWin/RWin, that should suppress the Start menu. For example, Send {Blind}{vkFF}.
If it fails to suppress the Start menu, that most likely means the Win key is being released (virtually or physically) before you send the key, or released and pressed again after you send the key, and is not being masked correctly. You can troubleshoot this by using KeyHistory, which should show a Win-down immediately followed by a Win-up, and should indicate whether these events were generated by AutoHotkey and with what timing.
The Start menu should appear only if you press and release a Win key while not holding any other modifier keys, and without pressing or releasing any other keys. In other words, what you describe should not be possible unless your hotkey is directly or indirectly releasing Shift and pressing and/or releasing the Win key (and Send is failing to mask it).
Recent versions of AutoHotkey do not mask the Win key when used in hotkeys like +#Up::, because the presence of the Shift key has already masked it.

How to turn off text overwrite mode in text editors?

I have used DevC++ and similar environments also have this application. While the overwrite mode is on the code overwrites instead of code moving to right.
The issue can be solved by using fn + insert(print screen) in Windows 8 or above and insert key in lower versions.
Like #Kokul says, you can press the Insert Key. If your Windows machine does not have a physical Insert key, you can press the virtual one, which you can find by pressing:
Windows Key > Ease of Access Keyboard Settings > Use the On-Screen Keyboard
Then press the Insert key which is located on the virtual keyboard to the right of the Enter key. Pressing the virtual key will behave like pressing the physical Insert Key.

Disable Alt key in Raspbian entirely

I am looking to develop the raspberry pi into something that I would be able to run a free use public web terminal which would be locked to a certain domain. This is for my employer, a township, who wants to set up terminals around the township so that the less fortunate in our community will be able to contact and interact with the various services that the township provides without having to find a way to the Administration center.
I have been able to get most of what I want working, but I want to disable the Alt key on the keyboard. This will stop users from being able to Ctrl+Alt+Del or Alt+F4 out of the browser environment, and various other features of LXDE that smart users could use to break my kiosk (like virtual terminals). I thought that I had found the method to do this, with xmodmap, but when I ran this command
xmodmap -e "keycode 204 = "
Which to my knowledge should set all mappings for the right Alt key to nothing, still lets me Alt+F4 in chromium and other things.
I also attempted to edit my ~/.config/openbox/lxde-rc.xml and change the keyboard bindings in it. I was able to disable the Ctrl+Alt+Del through that, but when I change or erase other key bindings in there, nothing happens. So I'm trying to figure out other options I have to disable the Alt key on this application. Any ideas?
Soo, I actually just answered my own question. Fixing the problem indeed lies in the ~/.config/openbox/lxde-rc.xml file, but I was not doing it right. To set the Ctrl Alt Delete option, you need to change the value between <command></command> to false (or a program that pops up a finger wag to the user).
The problem was, only four or so of the keys entries have a <command> field to them, and all of the other use an <action="whatever"></action> field to define the action that is being performed by the key. I was changing the value of "whatever" to false and was under the impression that would have the same effect as changing the command field.
But really, what you need to do is change the value of "whatever" to "Execute", and then nest a set of <command></command> with a value set to false and it will set the key's mapping to false. I guess there must be a set of default values that are used to override improper changes to the lxde-rc.xml files, and that's why things kept working after removing the entries.

Hooking softkeys on Windows?

My laptop has a mysterious "AV Now" button on it, which would usually launch Samsung's "AVStation Now" application. I don't have this application installed, so I'd like to get this button to do something else.
So (and this question can be generalised to any keyboard with softbuttons on it), how would I go about writing a Windows program (C++ or C#) to:
Figure out what pressing this button does. Is it a custom USB HID device, or is it just an obscure key combination?
Install a global hook for this button, so that I could get it to do something useful.
I'd like to get this button to do something else.
If you don't insist on writing the program yourself, you can remap keys: These extra buttons are mostly just obscure key combinations, and in WinXP and above it is possible to remap just about any button on the keyboard to any other by modifying a registry setting at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
There exists a frontend utility to do this for you: check out SharpKeys. You select the key to remap from, key to remap to, write to registry and reboot. (Writing the keymap into the registry requires administrative privileges, as the keyboard mapping is global for all users.)

Resources