Page 1 of 2

Accentuation

Posted: 04 Feb 2017, 18:38
by yCkeyLL
How to type á , ç , ã , ç ... ??

Hello Guys!
I am very happy to have discovered the HIDMacros. Years ago I needed a perfect application like that to remap more than one device.
I am currently designing custom application commands and it has been very useful ... But I have a problem ...
I use a keyboard with English \ International layout and some special keys are needed here in Brazil, such as: ã; ç, ê....

Usually when the HID is not running, they work normally. For example, to get the letter: [ ç ] I type [ ' ] and then [ c ]. The [ ç ] appears automatically.
The same with [ ã ]. I type [ ~ ] and then [ a ] and it automatically appears.
But whenever the HID is open, all these functions stop working

I did not find anything about this in the documentation, I would ask for some help or tip to solve this problem.
Thank you for your attention!

Re: Accentuation

Posted: 06 Feb 2017, 09:07
by admin
It's already reported here at forum.
Can you check if luamacros have the same problem? That would be the only place when I can fix it, no new version of Hidmacros planned...

Re: Accentuation

Posted: 06 Feb 2017, 15:57
by mrsimb
I noticed strange bug in LuaMacros, that might be related to this one.
For unknown reason, when i use my script, it only works with english keyboard layout.
When i switch to russian layout, no alphabet keys working properly.

Re: Accentuation

Posted: 06 Feb 2017, 16:25
by admin
Your script is quite complex (but cool :-)). Can you try to find out root cause and demonstrate it in some less sophisticated script? Would speed up things...

Re: Accentuation

Posted: 06 Feb 2017, 16:29
by mrsimb
Yeah, wait a couple of minutes
Btw, i tried to localize that bug so hard, but it's like some magic happens that i could not understand :D

Re: Accentuation

Posted: 06 Feb 2017, 16:42
by mrsimb

Code: Select all

clear()

keyNames = {
  [65] = 'a'
}

function handler(scanCode, direction)
  -- change your keyboard layout to russian
  -- press 'a'

  if (direction == 1 and scanCode == 65) then
    lmc_send_keys(keyNames[scanCode])
  end

  -- see how no characters been sent, and [KEY] ERROR thrown in log form
end

lmc_device_set_name('92&0&', '92&0&')
lmc_set_handler('92&0&', handler) 

Re: Accentuation

Posted: 06 Feb 2017, 16:44
by mrsimb
May be that's your lmc_send_keys tries to send characters, and if they are not in ascii (or whatever charset your programm uses) it just throws error

Re: Accentuation

Posted: 07 Feb 2017, 09:03
by admin
Ok, will take some time until I have a look because I'm currently busy with different sw project.
Maybe you can open issue at github (and for Abc/ABC too) for better tracking.

Re: Accentuation

Posted: 07 Feb 2017, 10:07
by mrsimb
Ok

Re: Accentuation

Posted: 07 Feb 2017, 10:29
by mrsimb
There are already opened issue about sending non-english characters