Hi Sunish, If the refactoring will improve the code you are more than welcome to change it.
Good to see that the rest works fine on your board. It is indeed a nice chip. As I mentioned earlier the programming pins are for this chip not shared with the USB pins which makes testing much easier. Kind regards, Rob ________________________________ Van: [email protected] <[email protected]> namens Sunish Issac <[email protected]> Verzonden: dinsdag 26 februari 2019 03:49 Aan: [email protected] Onderwerp: Re: [jallib] Re: 16f1455_usb_hid_keyboard Hello Rob, I was about to post the solution, when I saw your post. The problem is due to the fact that same key code generates different codes with modifiers, for example, 1 and ! has the same code 0x1e, but with the modifier shift it becomes !. I got the complete list from Github key codes<https://gist.github.com/MightyPork/6da26e382a7ad91b5496ee55fdc73db2> which seems to be accurate. Lot many are missing and some seem to be incorrect in jallib. We might have to refactor the code, and fix const array ascii_to_keyscan which maps all the 255 ASCII codes and send the correct key scan codes. Looks like it's also due to the difference in keyboard layout of US/European keyboards. Shift "2" is marked as " in EU keyboards where as @ in US. Also for chars <32 (space) Albert has used Ctrl as modifier which should have worked, but seems to be incorrect. May be it also depends on the windows locale info of the key board. I built a USB key dongle on a general purpose board with my windows password and local admin username and password with 16f1455. I also added a blue-tooth module so that the trigger can be from the mobile. 16F1455 is simply amazing because of the next to nil external components for USB. It's a long time since I did a JAL/electronics project and thank your for porting the library for this chip. Kind regards, Sunish On Tue, Feb 26, 2019 at 2:01 AM Rob Jansen <[email protected]<mailto:[email protected]>> wrote: Hi Sunish, Thanks for the info. So it is also in the original version? I am currently working on my 'Jaluino One' project that I want to finish first but I had a quick look at the library 'usb_keyboard.jal' and saw the following that I do not understand but might explain the issue. You see this: USB_KEYBOARD_KEY_SPACE, ; 0x20 space USB_KEYBOARD_KEY_1 | ASCII_USB_SHIFT, ; 0x21 char ! 0x34 | ASCII_USB_SHIFT, ; 0x22 char " USB_KEYBOARD_KEY_3 | ASCII_USB_SHIFT, ; 0x23 char # USB_KEYBOARD_KEY_4 | ASCII_USB_SHIFT, ; 0x24 char $ USB_KEYBOARD_KEY_5 | ASCII_USB_SHIFT, ; 0x25 char % USB_KEYBOARD_KEY_6 | ASCII_USB_SHIFT, ; 0x26 char & 0x34, ; 0x27 char ' USB_KEYBOARD_KEY_9 | ASCII_USB_SHIFT, ; 0x28 char ( USB_KEYBOARD_KEY_0 | ASCII_USB_SHIFT, ; 0x29 char ) USB_KEYBOARD_KEY_8 | ASCII_USB_SHIFT, ; 0x2A char * 0x2E | ASCII_USB_SHIFT, ; 0x2B char + 0x36, ; 0x2C char , 0x2D, ; 0x2D char - 0x37, ; 0x2E char . 0x38, ; 0x2F char / I do not understand why there is no USB_KEYBOARD_KEY_2 which should have the value 0x40 or "@" but it could explain the issue you have. Kind regards, Rob On Monday, February 25, 2019 at 6:01:10 AM UTC+1, Sunish Issac wrote: Hello Rob, The problem is there in 18F13k series too!. Its easily reproducible, try printing a string through keyboard from an array having @. It gets replaced by #. Please find attached the JAL file Sunish On Mon, Feb 25, 2019 at 2:10 AM Sunish Issac <[email protected]<mailto:[email protected]>> wrote: Hello Rob, I was able to compile for 18f13k50 (same as 14k50), there are no warnings, but I couldn't test the output as my test board uses type b cable which I don't have at the moment, will test tomorrow and update. Kind regards, Sunish On Sun, Feb 24, 2019 at 10:04 PM Rob Jansen <[email protected]<mailto:[email protected]>> wrote: Hi Sunish, This sample gives a warning that I do not yet understand. I am not sure if the warning has a relation with the problem you mentioned. Do you now if the same problem also occurs with the 18F14K50 sample program? Kind regards, Rob -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To post to this group, send email to [email protected]<mailto:[email protected]>. Visit this group at https://groups.google.com/group/jallib. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To post to this group, send email to [email protected]<mailto:[email protected]>. Visit this group at https://groups.google.com/group/jallib. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/jallib. For more options, visit https://groups.google.com/d/optout.
