strange letters from keyboard? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

strange letters from keyboard?

SWWSWW Posts: 5Member
is it a way to make real special letters as if they come from the keyboard such as "?"
these are used as color marks and i would like to have them sent from the keyboard as normal letters

Comments

  • adrianxwadrianxw Posts: 127Member
    : is it a way to make real special letters as if they come from the keyboard such as "?"
    : these are used as color marks and i would like to have them sent from the keyboard as normal letters
    :

    I think you'll need to be more specific to get a valid answer. I don't have one of those characters on my keyboard. If that key has a valid scan code, then you can send it, if not, assign a key you don't use to represent that character, trap the WM_CHAR or whatever you are using, and substitute it there.

    Without a clear understanding, I can't say more.


    Med venlig hilsen,

    Adrian...

  • SWWSWW Posts: 5Member
    : : is it a way to make real special letters as if they come from the keyboard such as "?"
    : : these are used as color marks and i would like to have them sent from the keyboard as normal letters
    : :
    :
    : I think you'll need to be more specific to get a valid answer. I don't have one of those characters on my keyboard. If that key has a valid scan code, then you can send it, if not, assign a key you don't use to represent that character, trap the WM_CHAR or whatever you are using, and substitute it there.
    :
    : Without a clear understanding, I can't say more.
    :
    :
    : Med venlig hilsen,
    :
    : Adrian...
    :
    :

    im probebly very bad at explaining cus i dont use any "real" programming langue.. im not extremely good in english ether
    its not a normal key letter so can you explain me the substitute of a letter plz?
    and you gotta be 100% specific what i gotta do on a specific DLL or activeX or i wont understand anything :P

    med venlig hilsen sww ;)
  • adrianxwadrianxw Posts: 127Member
    :
    : im probebly very bad at explaining cus i dont use any "real" programming langue.. im not extremely good in english ether
    : its not a normal key letter so can you explain me the substitute of a letter plz?
    : and you gotta be 100% specific what i gotta do on a specific DLL or activeX or i wont understand anything :P
    :
    : med venlig hilsen sww ;)
    :

    What are these "letters", and what editor are you using to enter them? What I'm thinking is you /may/ be able to program, for example, the function keys to insert your "letter", but I also suspect that your "letter" is not actually a letter at all, rather some escape sequence or similar that has meaning to your application.


    Med venlig hilsen,

    Adrian...

  • bikibiki Posts: 492Member
    Trouble understanding what you mean :

    Q 2. You mean you need to type such characters from your keyboard ?
    A 2. you could use the numeric keypad to enter such characters. eg. press ALT+0,6,5 in Note pad and you will see a capital 'A' being printed


    Q 1. you want the proper character to be displayed instead of "?" ?
    A 1. you would need to use the proper font for that. for example, "?" is ASCII code decimal 19, which in the Terminal font looks like this: &#19" (a double exclamation point - "!!")
    (you may not see the symbol if html does not display it correctly!)
    [hr][red]~Bikram[/red]

  • SWWSWW Posts: 5Member
    : Trouble understanding what you mean :
    :
    : Q 2. You mean you need to type such characters from your keyboard ?
    : A 2. you could use the numeric keypad to enter such characters. eg. press ALT+0,6,5 in Note pad and you will see a capital 'A' being printed
    :
    :
    : Q 1. you want the proper character to be displayed instead of "?" ?
    : A 1. you would need to use the proper font for that. for example, "?" is ASCII code decimal 19, which in the Terminal font looks like this: &#19" (a double exclamation point - "!!")
    : (you may not see the symbol if html does not display it correctly!)
    : [hr][red]~Bikram[/red]
    :
    :

    okay il try this question...
    i want a standard letter such as "%" to be replaced with "?" in the keyboard (memory) so it can be typed as if this strange letter actualy was on my keyboard

    this letter is not typeable using alt+val$ thingy

    i can use called functions on DLL files if you can point me to the right ones
    or if a program that can replace keyboard keys like this allready exist please tell me
  • adrianxwadrianxw Posts: 127Member
    : : Trouble understanding what you mean :
    : :
    : : Q 2. You mean you need to type such characters from your keyboard ?
    : : A 2. you could use the numeric keypad to enter such characters. eg. press ALT+0,6,5 in Note pad and you will see a capital 'A' being printed
    : :
    : :
    : : Q 1. you want the proper character to be displayed instead of "?" ?
    : : A 1. you would need to use the proper font for that. for example, "?" is ASCII code decimal 19, which in the Terminal font looks like this: &#19" (a double exclamation point - "!!")
    : : (you may not see the symbol if html does not display it correctly!)
    : : [hr][red]~Bikram[/red]
    : :
    : :
    :
    : okay il try this question...
    : i want a standard letter such as "%" to be replaced with "?" in the keyboard (memory) so it can be typed as if this strange letter actualy was on my keyboard
    :
    : this letter is not typeable using alt+val$ thingy
    :
    : i can use called functions on DLL files if you can point me to the right ones
    : or if a program that can replace keyboard keys like this allready exist please tell me
    :

    I'll try again...

    When you press a key on the keyboard, what is sent to the machine is a "scan code", it basically says that, for example, "the fourth key on the first full row was pressed down", now on most keyboards that will have the digit "3" on it, /but not necessarily/, different countries use different keyboard layouts. This is converted by the system to a "virtual keycode".

    Now, this key press gets translated to a Windows message, (WM_KEYDOWN), and your program receives that message, and in almost all cases calls a routine called TranslateMessage() which, using the OS settings you have in your Settings->Keyboard preferences, converts the virtual keycode to a real character, in the example I gave above, the character "3". This is now dispatched to your programs message processing loop, and it will receive a WM_CHAR message, indicating that the character "3" has been entered.

    WHat I suggested in my first message was, when you receive the WM_CHAR that says, inyour case "%" was pressed, you ignore the "%" and instead perform whatever you want to insert the ||, (I can't draw the square).

    NOTE no .dll calls, no nothing, just that. Easy. Why do you want to call a .dll?

    Med venlig hilsen,

    Adrian...

Sign In or Register to comment.