800x480 keyboard support?

Is there any support for a larger keyboard for the likes of the CP7 size displays?

The current one is just way too small for my display. Something that works with 800 x 480 would be nice :slight_smile:

my keyboard has 22x6 keys, and that’s more than I usually need :whistle:

Joke aside: What GUI lib are you using?

Glide!! That’s why I posted in the GLIDE forum!! :stuck_out_tongue:

PS… Hopefully you can get Clix2 going and I can switch over to that instead :slight_smile:

Couldn’t look into Clix so far, but will do at the weekend.
If touch keyboard is not available for high res LCD, then I put it on my task list for Clix.
I think I need to get some more HW for this. May be a raptor, TE42, CP7 :think:
Just some out of budget toys, as always :whistle:

there is a constructure to calculate a new glide keybord.


public Keyboard(
	int width,
	int height,
	int numViews,
	int keyHeight,
	int keySpacing)

i don’t use it before but I think this is the right way do get a bigger keyboard

Clix/Tinkr does autosize the keyboard to fit the screen appropriately. It generally will take uo about 3/4 the available height & 100% width with 3 layout modes (qwerty, azerty and numeric)

I’d convert to Clix2 but it’s a daunting task as this app has some 15 screens now and expanding as the client puts more into the system.

I think I can create a larger keyboard with Glide but still trying to work out how it does this by browsing through the code for it. There seems to have been a few changes to the way keyboard drawing is now done.

If I remember Glides keyboard is just an image that’s displayed on screen and it has rects defined for the buttons, which is why there’s only one size

I got it working. They have at least provided function calls to change it and you need to make a new graphic for starter. I just resized the 480x272 sample I had. I’ll do a nice new one later.

You also create the new width for each key.

Height is supplied during the constructor.

Finally a call to CalculateKeys() and you now have a new keyboard for your screen size.

Dave - I use this code and these images with an 800 x 480 display on a Cobra 1:


	// set custom keyboard
	Glide.Keyboard = InitKeyboard();

		private static Keyboard InitKeyboard()
		{
			Keyboard keyboard = new Keyboard(680, 272, 3, 68, 0);

			// each view with keys in a up position.
			keyboard.BitmapUp = new Bitmap[4]
            {
                new Bitmap(Resources.GetBytes(Resources.BinaryResources.Keyboard_680x272_Uppercase), Bitmap.BitmapImageType.Gif),
                new Bitmap(Resources.GetBytes(Resources.BinaryResources.Keyboard_680x272_Lowercase), Bitmap.BitmapImageType.Gif),
                new Bitmap(Resources.GetBytes(Resources.BinaryResources.Keyboard_680x272_Numbers), Bitmap.BitmapImageType.Gif),
                new Bitmap(Resources.GetBytes(Resources.BinaryResources.Keyboard_680x272_Symbols), Bitmap.BitmapImageType.Gif)
            };

			// set the default key content.

			string[][] keyContent = new string[4][];

			// letters
			keyContent[0] = new string[10] { "q", "w", "e", "r", "t", "y", "u", "i", "o", "p" };
			keyContent[1] = new string[9] { "a", "s", "d", "f", "g", "h", "j", "k", "l" };
			keyContent[2] = new string[9] { Keyboard.ActionKey.ToggleCase, "z", "x", "c", "v", "b", "n", "m", Keyboard.ActionKey.Backspace };
			keyContent[3] = new string[5] { Keyboard.ActionKey.ToNumbers, ",", Keyboard.ActionKey.Space, ".", Keyboard.ActionKey.Return };
			keyboard.SetViewKeyContent(Keyboard.View.Letters, keyContent);

			// numbers
			keyContent[0] = new string[10] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "0" };
			keyContent[1] = new string[10] { "@ ", "#", "$", "%", "&", "*", "-", "+", "(", ")" };
			keyContent[2] = new string[9] { Keyboard.ActionKey.ToSymbols, "!", "\"", "'", ":", ";", "/", "?", Keyboard.ActionKey.Backspace };
			keyContent[3] = new string[5] { Keyboard.ActionKey.ToLetters, ",", Keyboard.ActionKey.Space, ".", Keyboard.ActionKey.Return };
			keyboard.SetViewKeyContent(Keyboard.View.Numbers, keyContent);

			// symbols
			keyContent[0] = new string[10] { "~", "`", "|", "•", "√", "π", "÷", "×", "{", "}" };
			keyContent[1] = new string[10] { Keyboard.ActionKey.Tab, "£", "¢", "€", "º", "^", "_", "=", "[", "]" };
			keyContent[2] = new string[9] { Keyboard.ActionKey.ToNumbers, "™", "®", "©", "¶", "\\", "<", ">", Keyboard.ActionKey.Backspace };
			keyContent[3] = new string[5] { Keyboard.ActionKey.ToLetters, ",", Keyboard.ActionKey.Space, ".", Keyboard.ActionKey.Return };
			keyboard.SetViewKeyContent(Keyboard.View.Symbols, keyContent);

			// or we could just call this:
			// keyboard.DefaultKeyContent();

			int[][] keyWidth = new int[4][];

			// Each array entry represents a row of keys on the keyboard top-down (0-3)
			// Each array within these entries contains the widths of the keys for that row.
			// For example: keyWidth[0] = new int[10] { 68, 68, 68, 68, 68, 68, 68, 68, 68, 68 }
			// represents the first row (0) which contains the keys Q, W, E, R, T, Y, U, I, O, P

			// Letters
			keyWidth[0] = new int[10] { 68, 68, 68, 68, 68, 68, 68, 68, 68, 68 };
			keyWidth[1] = new int[9] { 68, 68, 68, 68, 68, 68, 68, 68, 68 };
			keyWidth[2] = new int[9] { 102, 68, 68, 68, 68, 68, 68, 68, 102 };
			keyWidth[3] = new int[5] { 102, 68, 340, 68, 102 };

			keyboard.SetViewKeyWidth(Keyboard.View.Letters, keyWidth);

			// Numbers
			keyWidth[0] = new int[10] { 68, 68, 68, 68, 68, 68, 68, 68, 68, 68 };
			keyWidth[1] = new int[10] { 68, 68, 68, 68, 68, 68, 68, 68, 68, 68 };
			keyWidth[2] = new int[9] { 102, 68, 68, 68, 68, 68, 68, 68, 102 };
			keyWidth[3] = new int[5] { 102, 68, 340, 68, 102 };

			keyboard.SetViewKeyWidth(Keyboard.View.Numbers, keyWidth);

			// Symbols
			keyWidth[0] = new int[10] { 68, 68, 68, 68, 68, 68, 68, 68, 68, 68 };
			keyWidth[1] = new int[10] { 68, 68, 68, 68, 68, 68, 68, 68, 68, 68 };
			keyWidth[2] = new int[9] { 102, 68, 68, 68, 68, 68, 68, 68, 102 };
			keyWidth[3] = new int[5] { 102, 68, 340, 68, 102 };

			keyboard.SetViewKeyWidth(Keyboard.View.Symbols, keyWidth);

			keyboard.CalculateKeys();

			return keyboard;
		}


Thanks jasdev. Your images a nice and sharp compared to the expanded ones I created and it looks a little nicer than going the full width of the LCD. With 5" it still makes for nice sized keys!

:slight_smile:

Cheers.

@ Dave McLaughlin - Yes they do look nice! I think I got them from a project GHI published a couple of years ago.