using X;

class ConvertTest : Object {
	public static void main(){
		stdout.printf("From a string to a KeySym:\n");
			string my_string ="a";
			stdout.printf("	String '%s' has KeySym %d\n", my_string, (int) string_to_keysym(my_string));
			stdout.printf("\n");

		stdout.printf("From a KeySym to *:\n");
			KeySym my_keysym = 0x0066;
			Display display = new X.Display();
			KeySym my_lower;
			KeySym my_upper;
			convert_case(my_keysym, out my_lower, out my_upper);
			stdout.printf("	KeySym %d has string %s\n", (int) my_keysym, keysym_to_string(my_keysym));
			stdout.printf("	KeySym %d has KeyCode %d\n", (int) my_keysym, (int) display.keysym_to_keycode(my_keysym));
			stdout.printf("	KeySym %d has lower case KeySym %d ('%s')\n", (int) my_keysym, (int) my_lower, keysym_to_string(my_lower));
			stdout.printf("	KeySym %d has upper case KeySym %d ('%s')\n", (int) my_keysym, (int) my_upper, keysym_to_string(my_upper));
			stdout.printf("\n");

		stdout.printf("From a KeyCode to a KeySym:\n");
			KeyCode my_keycode = 0x002A;
			stdout.printf("	KeyCode %d has KeySym %lu\n", (int) my_keycode, (int) display.keycode_to_keysym(my_keycode, 0));
			stdout.printf("\n");
	}
}
