picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.53k stars 318 forks source link

Keys.Plus is obsolete although it is a separate key on german keyboards #2595

Open rominator1983 opened 7 months ago

rominator1983 commented 7 months ago

Expected Behavior

Plus not being Obsolete. On German keyboards the plus is a separate key next to the Enter-key which can be used without modifiers (shift, alt, control, etc.). I simply do not know how the pressing of the plus key would even have to be detected in code on a German keyboard. At least it would be hard to know that it is a modifier key (Shift plus Equal key). But as said I do not know if that would even work.

So I would strongly suggest not to remove that Key Enum. I would of course like to have your thoughts on that since I am quite new to Eto.

Actual Behavior

Plus is Obsolete

Steps to Reproduce the Problem

  1. Look at code

Code that Demonstrates the Problem

    //
    // Summary:
    //     The Plus '+' Key, which usually produces an '=' when pressed without shift and
    //     is beside the backspace key.
    [Obsolete("Since 2.4, Use Equal")]
    Plus = 0x55,

Specifications

ManuelHu commented 7 months ago

The advice provided correct. Just use Key.Equal instead of Key.Plus. It is literally the same (the code from 2.8.2): https://github.com/picoe/Eto/blob/d612886162b94b5e95aec055ff220907c021d5d2/src/Eto/Forms/Key.cs#L113-L115

Additionally, Keys.Equal is working for me with a German keyboard and Gtk when I press the plus key.

Krutonium commented 6 months ago

I'm with OP here, I own a keyboard with a dedicated + key.