Dyalog APL - Disabling APL symbol input - keyboard

I recently obtained a personal licence for Dyalog APL and started using it (I'm switching over from APLX). I really like it, but whenever I'm not using the IDE, the APL symbol keybindings persist. For example, if I try to undo something in another application by hitting CTRL-Z, I'll instead get ⊂ and the undo will not go through. Similarly, attempting to use CTRL-S to save a document will result in me typing ⌈ instead of saving. The only way I've been able to resolve this is by restarting my computer.
How can I disable APL symbol input after the IDE is either not in focus or has been closed? If there's no way to do that, is it possible to map the symbol shortcut to ALT instead of CTRL? ALT is used far less often than CTRL for shortcuts, so I could live with that.
I'm using Windows 8.1 64 bit and the 64 bit version of Dyalog APL with a US keyboard.

If you want to use AltGr (right side Alt) to enter APL symbols while keeping a normal US layout or an almost normal UK layout, you can use my keyboard layout instead of the IDE. This avoids almost all clashes with other applications, so you can keep the keyboard active at all times and forget about mode switching.

Dyalog uses a standard Windows mechanism called "IME" (Input Method Editor) to enable input of APL-Characters. The advantage is that this enables you to use APL-Symbols anywhere - but obviously there is a 2nd side to that.
The "challenge" in your setup is only to change the IME back from APL to regular text-mode and this does not need a reboot. Pls check this article for more info on IME: https://www.google.de/amp/www.thewindowsclub.com/input-method-editors-windows/amp
(Sorry, I'm using W10, so I rather refer you to that article than giving wrong info... BTW, the advantage of W10 is that the IME will be default work in application-mode, so you can go to WinWord there and use default hotkeys w/o switching IME.)
Edit: For those using W10 (and probably W11) that article is out of date. The Languages settings are no longer in the Control Panel and are now in Settings. Go to Time and Language>Keyboard>"Input language hot keys" and change the Key sequence for "Between input languages". The "Switch Keyboard Layout" shortcut will be the one that toggles between keyboard layouts (I have Shift+LeftAlt toggling between Dyalog and US). You can also see which keyboard you are using on the taskbar by adjusting "Language bar options" on the same Settings page.

Related

unwanted: APL keyboard overlay enabled?

I've been trying out APL. I'm running Windows 10 and I've installed Dyalog 18.0, and the APL Language and APL Backtick Symbols extentions for VS Code.
But even though I'm not running any of these programs, sometimes suddenly my keyboard is hyjacked! All my ctrl commands are replaced by APL symbols.
E.g. ctrl-Z (undo) becomes ⊂ and ctrl-A (select all) becomes ⍺. I have no idea why and how to disable this again. This makes it very hard to do my work!!!
I've been googling for this, but haven't found an answer so far. I've looked at the Windows keyboard settings, but it looks normal. The locale settings are also correct.
I'm now just de-installing everything, but that way I need to reinstall every time I want to try out APL.
Can somebody tell me what is happening and how to fix it? (And tell me who to complain to that this is a very hostile feature)
I am sorry that our Unicode IME is causing you confusion.
I do like using it, but there are some Windows settings which I set to make things easier.
Start button->Settings
In the "Find a setting" edit field, type Advanced keyboard settings
Click on the icon with that text on it
Under Switching input methods:
Tick the “Let me set a different input method for each app window”
Tick the "Use the desktop language bar when it's available". This option will show the orange D icon when our Dyalog Unicode IME is active.
On this same dialog, there is a Input language hot keys.
I find it convenient to select a hot key combination to activate our Unicode IME, and another one to go back to the default Windows keyboard layout.
Close this dialog with the X button in the top right.
If you have further problems or questions, you can always ask us at support#dyalog.com
By the way, we put links to advice pages about keyboards on our website under Resources->Fonts and Keyboards.
Regards,
Vince
When installing the standard Dyalog IME, there is a new keyboard input method on Windows. Have you checked WinKey+Space? This should cycle through available keyboard layouts and you should find your previous/default layout available there.
I personally agree that this is not a good way to handle keyboarding and causes many issues for newcomers to APL. Dyalog is aware and are looking into alternatives that can be comfortable for both new and existing users.
You can uninstall the standard IME without uninstalling the entire interpreter by running the Dyalog uninstaller (search "uninstall Dyalog" in your start menu) and selecting just the IME.
For now, I recommend the APL Wiki article on Typing Glyphs for some ideas for alternatives to the standard IME: https://aplwiki.com/wiki/Typing_glyphs#Windows
I personally use the abrudz keyboard with Alt Gr as the switching key.
I just wanted to add that your complaint has reached the people who need to be complained to. This is a difficult problem space, between changing technologies, multiple platforms, new or casual users of APL and the folks who use APL all the time and want to type APL symbols into e-mail messages, etc. It is most definitely time for an overhaul of the keyboard technologies that we use and this will be on the to do list for the next development cycle. Until then, I hope you manage to get by with the advice that has been offered so far!
Thanks for the shout,
Morten Kromberg, CTO, Dyalog

Accessible hotkeys for superscript and subscript

I want to add a feature of making text super- or subscript to a WYSIWYG text editor in my web application and I need to set up hotkeys for it. Popular editors like Microsoft Word use Ctrl+Shift+= for superscript and Ctrl+= for subscript, but I can't use those since they trigger browser native zoom. Of course, I have separated buttons for super- and subscript and I will add hints to them, but I'd still like to make hotkeys as convenient as possible. Is there another common combination for these features?
Alternative Hotkeys
Ctrl + . for superscript and Ctrl + , for subscript are acceptable alternatives. (full stop / period and comma). They are the defaults set for Google Docs so familiarity will be reasonably high.
Accessibility Considerations
You cannot assume that any key is 'safe' as people may change their hotkeys to their preference.
For this reason you should always give people the option to change shortcut keys themselves in a settings menu (which should be easy to access).
You should also give people the option to toggle hotkeys on and off (yet again making the hotkey for that toggle customisable to their preference).
A lot of the time people come unstuck because they use a hotkey that overlaps with a screen reader hotkey and the hotkey doesn't work so make sure you consider the above before implementing hotkeys.
Also make it clear what hotkey is set for each item (to both sighted and screen reader users).

Resharper's settings often reset spontaneusly

Resharper's settings often reset spontaneously. This happens almost always after Visual Studio has been restarted, but I don't found exact regularity.
This continually repeats on every Visual Studio on every machine I am work.
This is corrected by pressing "Apply Scheme" inside "Resharper options -> Keyboard & Menus".
But why is this happening and how to prevent it from happening again?
In case you have a non-English keyboard language installed on a machine, you may probably experience this issue https://youtrack.jetbrains.com/issue/RSRP-449737. Visual Studio can forget custom shortcuts if you change keyboard languages between launching/closing Visual Studio instances.
You may try reproducing the same issue on any custom shortcuts as described in ticket's comment:
Suspend ReSharper. Restart VS.
English is an input language. Assign shortcut "Ctrl+/" to the Edit.NavigateTo command using Tools | Options | Keyboard (see 1.png)
Restart VS. Shortcut is assigned (see 2.png)
Close VS. Switch to a non-English input language. Start VS. The shortcut becomes "Ctrl+\" (see 3.png and 4.png)
Close VS. Your language is still an input language. Start VS. Shortcut is lost (see 5.png and 6.png). It's 100% reproducible for Russian. You can use any VS command instead Edit.NavigateTo, it does not matter. May be you can try to apply the shortcut in French and then switch to English.

Dvorak typers, how do you handle shortcuts like Ctrl-C?

Do you change the key binding in the OS to be, i.e., Ctrl-Q?
Do you manage to stretch your left hand to the C key?
Do you use right ctrl and press shortcuts with your right hand?
When I switched to Dvorak, I was using primarily Ctrl+Ins and Shift+Ins for copy/paste. Now I use Ctrl+C and Ctrl+V and other program-specific shortcuts, but I have just learned to use them in their "weird" locations.
A similar question was asked on SuperUser, with the following answers:
Use an AutoHotKey script to remap the keys. (Link)
Use Microsoft Keyboard Creator to remap them. (Link)
Install a third-party app that will remap them automatically. (Link, Link)
macs have it built in. there is a keyboard layout for dvorak with querty shortcuts. for windows, i use https://code.google.com/p/dvorak-qwerty/ it works well with ctrl and alt but dosen't work with the Win Key, which is not that bad.
The program AutoHotKey is what I use to map C,X, and V to their Querty origin.
I use none of the proposed solutions: instead, I modify CapsLock so that it becomes a dead-key that I use to program various actions. For example, when I press CapsLock and the key marked (in QWERTY)
S, this is mapped to Ctrl-X (and thus cut)
D, this is mapped to Ctrl-C (and thus copy)
F, this is mapped to Ctrl-V (and thus paste)
I, this is mapped to up-arrow
K, this is mapped to down-arrow
J, this is mapped to left-arrow
L, this is mapped to right-arrow
etc.
This is was dubbed 'Home Row computing' by Gustavo Duarte when he introduced this idea in https://manybutfinite.com/post/home-row-computing/ and then https://manybutfinite.com/post/home-row-computing-on-mac/
I'm pretty sure that this amounts for a large part of the speed I gained when typing, in addition to touch-typing.
On Linux, the solution that works great with some versions of Gnome on Wayland is this. It will set up all the rules on installation and will work transparently.
Previous answer:
Using Cinnamon, the following works when typing in some applications (i.e. vscode editor):
In keyboard settings, add QWERTY keyboard layout as the first in the list,
add Dvorak layout as the second
When typing text in an editor using the Dvorak layout, pressing Ctrl will still use the first (qwerty) layout.
This does not work in other applications, like Firefox browser, for example so can be pretty confusing.
Having a shortcut (i.e. Alt+Shift) for switching layouts assists in those cases.
While can be difficult at times, the advantage of this approach seems to be that it does not require additional software.
I've written Dvertkey, an AutoHotKey script, for this.
I've been a dvorak user for sixteen years, and for years I've used the various alternative keymaps mentioned in this thread, but all of them fall down when using a number of recent incarnations of Microsoft applications, such as the Office apps and SQL Server Management Studio. They seem to ignore Windows' own keymaps when using meta keys, rendering the hybrid layouts useless. AutoHotKey gets around this to ensure I get exactly what I want in any application.
I've been using Dvorak for so long now that I couldn't imagine remapping ctrl-c and other hotkeys to be in any other location than where they are supposed to be on the Dvorak keyboard. As for hotkeys, it's much easier and more natural to just use two hands to do the combinations. Use the left hand for ctrl and the other hand for the c-key. It would be too confusing to try and think ctrl-c and then press something else.
For the occasional windows game that requires WASD, I just switch the keyboard for the duration and if that means typing QWERTY sentences in chat then I just mentally switch and type a little bit slower.
Those characters are accessible with the right control key (a bit of a stretch for the x). If you are right handed, and have your right hand on the mouse, just move your left hand to the right control key and do the key combination

Shortcut with meta-shift key doesn't work in emacs

I can't use any shortcut that has meta-shift (alt and shift) in it because ubuntu will treat it as "change keyboard layout" shortcut (I map it to alt-shift since I use the same shortcut in windows) as soon as I press m-s. In windows change keyboard layout shortcut doesn't register until you release the key so any shortcut with m-s is usable in windows.
Is there any work-around without changing shortcut or meta key ? I kinda used to it.
Change the Ubuntu change-keyboard-layout shortcut, to something else.
Or use Esc as Meta
Nothing easy that I know of.
You can manually bind everything that's M-S-??? to C-M-S-??? in your .emacs or at least all of the ones that you use...
Or you can just change the short-cut... how often do you change the keyboard layout? (I use dvorak, and qwerty, but I've never needed a shortcut for it, I just use the button...)
I have tried different things, and in my opinion it is best to change the layout shortcut to something else. The power of emacs is all in its shortcuts that are available right there under your fingers. If you move the M key away and make it harder to reach, it will most surely have a negative impact on your editing speed.
Right now I'm trying to get used to switching layouts with the right Alt key. I almost never use it for anything, so missing it won't be a problem. And from my experience teaching yourself to switch layouts with another combination is a matter of several days.
P.S. Also it pays to use Caps-Lock as an additional Ctrl key, it helps tremendously!

Resources