Page 1 of 1

Change Keypad character.

Posted: 02 Mar 2017, 21:30
by Antonio Garcia
How can I change in numeric Keypad character "." by "," ?

Thanks.

Re: Change Keypad character.

Posted: 30 Mar 2017, 13:07
by HaiH
You will need to have applied v3.11 hotfix 001

This hotfix contains an enhancement item: Added the functionality to map the decimal point from the numeric keypad on a French keyboard

You will need to add the following to your keyboard mapping, for example if using the windows keyboard add the following into axes_root/ts/windowskeymap.xml

Code: Select all

<MAP>                              
   <KEY>Decimal</KEY>              
   <DESC>Insert Decimal</DESC>     
   <COMMAND>InsertDecimal</COMMAND>
</MAP>                             
When you run in a supported region code, eg French with lang=fr then you can now use the decimal point as a ','

Re: Change Keypad character.

Posted: 27 Apr 2023, 00:04
by Fre_Vdh
Hello,

Is this stil the solution to use today?
I added the MAP in my windowskeymap.xml but it doesn't change anything.

Kind regards,
Frederik

Re: Change Keypad character.

Posted: 27 Apr 2023, 00:51
by Dino
Hi Fred

InsertDecimal adds the decimal character according to the regional settings (IBM, Windows, browser, etc.).

It does not just plainly replace a comma with a dot or a dot with a comma.

If you go to any form in the web with input fields and press the decimal character in your numeric keyboard, you should see a character appear. The same one, should be used by aXes when you say InsertDecimal.

Kind regards,

Re: Change Keypad character.

Posted: 28 Feb 2024, 20:59
by Fre_Vdh
Hi,

We have recently changed to other Citrix servers and now everybody's profile is in English instead of Dutch or French.
Because of that the decimal point is now always a dot, but we would like a comma.

I tried it with:

Code: Select all

<MAP>
          <KEY>0xBC</KEY>
          <DESC >Num Pad decimal point</DESC>
          <COMMAND>InsertDecimal</COMMAND>
</MAP>
But it's still putting a dot.

Is there something else I could try?

Kind regards,
Frederik

Re: Change Keypad character.

Posted: 22 Mar 2024, 21:31
by Fre_Vdh
After seeing this post viewtopic.php?f=9&t=219&p=549&hilit=ax_once#p549, we found a solution.

In the script we put the following code:

Code: Select all

window.addEventListener("keyup", function (event) {
  if (event.code === 'NumpadDecimal') {
    event.preventDefault();
    var value = event.target.value;
    const myArray = value.split("");
    var idx = event.target.selectionStart;
    var substr = value.substring(idx-1,idx);
    if (substr == '.'){
        value = value.substring(0, idx-1) + "," + value.substring(idx);
    }
    event.target.value = value;
  }
});
This way, everytime the decimal key from the numpad panel is pushed and it's a dot, it will be replaced with a comma.