The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Hash key on Macbook Pro (OSX 10.11.6)
Peter Vince


Joined: 19 Sep 2016
Posts: 3
I'm trying to use an application on a Macbook Pro with a British keyboard, that has been written with SDL. That laptop has no direct key for the Hash (#) character, and I normally need to press ALT-3 to get that character. But it appears SDL is trapping the ALT key, so preventing me using that character - unless I cut-and-paste it from another Mac application.

Has this been noticed before, and is there a work-around please?

Thank you
Hash key on Macbook Pro (OSX 10.11.6)
Jonny D


Joined: 12 Sep 2009
Posts: 932
Is this happening for an SDL_TEXTINPUT event?

Jonny D


On Mon, Sep 19, 2016 at 1:20 PM, Peter Vince wrote:
Quote:
I'm trying to use an application on a Macbook Pro with a British keyboard, that has been written with SDL. That laptop has no direct key for the Hash (#) character, and I normally need to press ALT-3 to get that character. But it appears SDL is trapping the ALT key, so preventing me using that character - unless I cut-and-paste it from another Mac application.

Has this been noticed before, and is there a work-around please?

Thank you


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: Hash key on Macbook Pro (OSX 10.11.6)
Peter Vince


Joined: 19 Sep 2016
Posts: 3
Hi Jonny. Thanks for your reply. Short answer - yes.

Peter


Jonny D wrote:
Is this happening for an SDL_TEXTINPUT event?

Jonny D


On Mon, Sep 19, 2016 at 1:20 PM, Peter Vince wrote:
Quote:
I'm trying to use an application on a Macbook Pro with a British keyboard, that has been written with SDL. That laptop has no direct key for the Hash (#) character, and I normally need to press ALT-3 to get that character. But it appears SDL is trapping the ALT key, so preventing me using that character - unless I cut-and-paste it from another Mac application.

Has this been noticed before, and is there a work-around please?

Thank you


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: Hash key on Macbook Pro (OSX 10.11.6)
Peter Vince


Joined: 19 Sep 2016
Posts: 3
Hi Jonny,

Yes - this is the code segment being used:

case SDL_TEXTINPUT:
i = 0;
while (ev.text.text[i] != '\0')
putkey(ev.text.text[i++]) ;
break ;

Regards,

Peter


Jonny D wrote:
Is this happening for an SDL_TEXTINPUT event?

Jonny D


On Mon, Sep 19, 2016 at 1:20 PM, Peter Vince wrote:
Quote:
I'm trying to use an application on a Macbook Pro with a British keyboard, that has been written with SDL. That laptop has no direct key for the Hash (#) character, and I normally need to press ALT-3 to get that character. But it appears SDL is trapping the ALT key, so preventing me using that character - unless I cut-and-paste it from another Mac application.

Has this been noticed before, and is there a work-around please?

Thank you


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org