Change Keypad character.

Use this Forum to post your “How to …” questions about your use of aXes. This is not a technical support forum. Both the aXes Support Team at LANSA and other aXes customers may answer your questions. LANSA cannot guarantee the accuracy of any information posted by customers.

Moderator: jeanmichel

Post Reply
Antonio Garcia
Posts: 1
Joined: 17 Jul 2014, 17:41

Change Keypad character.

Post by Antonio Garcia » 02 Mar 2017, 21:30

How can I change in numeric Keypad character "." by "," ?

Thanks.

HaiH
Posts: 3
Joined: 25 May 2016, 17:32

Re: Change Keypad character.

Post by HaiH » 30 Mar 2017, 13:07

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 ','

Fre_Vdh
Posts: 30
Joined: 20 Oct 2022, 17:49

Re: Change Keypad character.

Post by Fre_Vdh » 27 Apr 2023, 00:04

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

User avatar
Dino
Posts: 88
Joined: 19 May 2017, 08:29

Re: Change Keypad character.

Post by Dino » 27 Apr 2023, 00:51

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,

Fre_Vdh
Posts: 30
Joined: 20 Oct 2022, 17:49

Re: Change Keypad character.

Post by Fre_Vdh » 28 Feb 2024, 20:59

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

Fre_Vdh
Posts: 30
Joined: 20 Oct 2022, 17:49

Re: Change Keypad character.

Post by Fre_Vdh » 22 Mar 2024, 21:31

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.

Post Reply