electro-music.org   Dedicated to experimental electro-acoustic
and electronic music
 
 Front Page  |  Radio  |  Forum  |  Media  |  Playlists  |  Wiki
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » ChucK programming language
ChucK and International Keyboards
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [5 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 270

PostPosted: Mon Dec 22, 2008 3:03 am    Post subject: ChucK and International Keyboards
Subject description: what's up with that?
Reply with quote  Mark this post and the followings unread

I wrote an application that uses the keyboard in ChucK, but people in Belgium and the UK cannot use it. I can find some info about keyboard layouts on the web, but there seems to be no actual keyboard code tables for these keyboards. What gives? What should I do?
_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Mon Dec 22, 2008 10:04 am    Post subject: Reply with quote  Mark this post and the followings unread

This is indeed tricky. I myself use a Dutch keyboard layout without any branded (Apple/ MS) keys but you can't get laptop keyboards that way so sometimes when traveling more lightly I have to us the US layout on my laptop itself.

It gets tricky when using the keyboard in ChucK. It depends on what you want; do the keys you use need to be on the same spot on the keyboard or do they need to refer to the same character? Depending on what you want either will be more suitable but neither is fool proof; not all keys have acci characters associated with them and not all layouts are the same; for example on my keyboard there are three keys between the "L" and the "enter", on a US layout only two.

One good method may be to have a class called "keys" and define a list of integers in it named after keys. If you do that you can use code like;

if (msg.which == keys.space) do.something();

That saves a lot of "magic numbers" and is quite easy to reconfigure.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 270

PostPosted: Mon Dec 22, 2008 10:20 am    Post subject: Reply with quote  Mark this post and the followings unread

OK, I can do that, but first I must know what numbers ChucK will report from a Belgian keyboard, for example. Does anyone know of the codes for such a thing?
_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Mon Dec 22, 2008 10:51 am    Post subject: Reply with quote  Mark this post and the followings unread

Sorry, I do it all by hand with a notebook myself.
_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 270

PostPosted: Mon Dec 22, 2008 10:56 am    Post subject: Reply with quote  Mark this post and the followings unread

That's OK Kassen, I'll just have to have my test users tell me their keyboard codes.
_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [5 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Log in
Username:     Password:      Log me on automatically each visit    


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2026 by electro-music.org