archimatetool / archi

Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
MIT License
914 stars 267 forks source link

„Alt character codes“ (e.g., – and the quotes) open various tool windows – instead of typing a character. Windows 10 #948

Closed bradacjan closed 11 months ago

bradacjan commented 11 months ago

Hello,

while using Archi, I have run into the afore- and below mentioned issue with special characters. It is a bit frustrating, though not a breaking issue. Since we use Archi to create or edit official government documents, we would prefer to use proper characters, e.g., – instead of - , „ and “ instead of so called "quotes" (actually inch sign) and so forth.

I really enjoy using Archi at work (and have actually supported it financially in the recent past), so this „quality of life improvement“ would be very much welcome. Note: I am a programmer, so if this fix were simple to implement, I am open to help.

Version of Archi

5.0.2 , [The current latest version]

Archi Plug-ins

None installed

Operating System

Windows 10

Expected Behaviour

A character by given code should be placed in the currently focused text field or area (e.g., element's name or documentation field), e.g., alt + 0150 to – , alt + 0147 to “ , alt + 0132 to „ , and so on.

Actual Behaviour

The text field loses focus and tool windows are open depending on pressed alt combinations. E.g., alt + 0132 toggles Models (alt + 1), Outline (alt + 3), and Properties (alt + 2) windows (open or close depending on their current state).

Steps to Reproduce the Behaviour

  1. Add any element, for example Application Component
  2. Double-click this element to edit it
  3. Click the Documentation field to focus it
  4. Input the alt + 0132 code in an attempt to write the sign.
  5. Watch the world burn Observe a loss of focus and Models, Outline and Properties windows toggle (as described above)

Note: I have no error log for this as the program does not crash or „think“ it is broken – so none are provided.

Phillipus commented 11 months ago

Summary - Alt key shortcuts for different views (Alt 1, Alt 2, etc) conflict with character combinations like Alt + 0132 when inputting in a text field.

You can re-assign these key combinations in Preferences -> System -> Keys.

Or you can use the numeric keypad if you have one.

I might change the defaults to Alt + Shift

Phillipus commented 11 months ago

I'll close this one now because:

  1. You can re-assign these key combinations in Preferences -> System -> Keys.
  2. You can use the numeric keypad if you have one.
  3. I've set the shortcut keys to "Alt+Shift+num" in the next version
bradacjan commented 11 months ago

@Phillipus Thank you very much for such a quick resolution!

For your info, I am already using the numeric keypad („Num lock-ed keys“). But the tip about rebinding window shortcuts in configuration is a solid workaround for now. Thank you.

But: although setting the defaults to alt + shift will fully solve the problem, I think it may be better for Archi to ignore the num pad number for the window shortcuts (as you have suggested should already work). Would it not be worth looking at? I expect that to be a simple change, but I am not familiar with Eclipse development, so I do not want to force any solution upon you.

Edit: I see the issue now! I am using a non-english keyboard configuration. I run a cz-cs keyboard. On English keyboard, everything works fine as you have said. But on the Czech keyboard the numpad and other numbers work differently – when on the Czech keyboard the alt+numpad opens tool windows and „normal“ keyboard numbers are ignored. I am therefore afraid that the fix in next version will not work.

Phillipus commented 11 months ago

Why would it not work if the key bindings for the windows are not set to Alt + num? Just bind them to something that works.