[Bf-committers] Configurable keybindings
Wed, 26 May 2004 00:35:52 -0400
How will it work, > Note : I am trying to not make this become a=20
shouting match, as it might become from others.
Will it be a menu ? Or will it be live like Wings3d where you can just=20=
assign a key to a button at any time?
On May 26, 2004, at 12:21 AM, Tom Musgrove wrote:
> I'm fairly far along with the work I need to do to make it so that=20
> configurable keybindings can be used throughout blender.
> To make it so that I can use case switches instead of if else if, i=20
> need to make it so that I can add G.qual (Ie LR_SHIFTKEY, LR_CTRLKEY,=20=
> LR_ALTKEY, or combinations thereof) and Events together and not have=20=
> any collisions.
> The current definitions for the above these keys is in BKE_global.h
> #define R_SHIFTKEY 1
> #define L_SHIFTKEY 2
> #define LR_SHIFTKEY 3
> #define R_ALTKEY 4
> #define L_ALTKEY 8
> #define LR_ALTKEY 12
> #define R_CTRLKEY 16
> #define L_CTRLKEY 32
> #define LR_CTRLKEY 48
> Currently if we can have two modifiers active we do something like
> G.qual =3D=3D (LR_CTRLKEY | LR_ALTKEY)
> which is not switch case friendly, so perhaps have something like
> #define LR_CTRLKEY_AND_LR_ALTKEY
> #define LR_SHIFTKEY_AND_LR_ALTKEY
> #define LR_SHIFTKEY_AND_LR_CTRLKEY
> #define LR_SHIFTKEY_AND_LR_CTRLKEY_AND_LR_ALTKEY
> #define LR_CTRLKEY_OR_LR_ALTKEY
> #define LR_CTRLKEY_AND_OR_LR_ALTKEY
> etc. (about twenty of them i think?)
> perhaps start at 5000 above whatever the highest event value isis and=20=
> increment by 1000.
> Then, the key combination definitions are done like
> #define MAKE_PARENT (LR_CTRLKEY_AND_OR_LR_SHIFTKEY + PKEY)
> and the switch case would be
> case MAKE_PARENT: make_parent(); Handled =3D TRUE; break;
> I'm making changes and seperating out drawipo.c , the toets.c, space.c=20=
> and other files that have lots of hardcoded values. and mix key=20
> combo/event evaluation with function definitions.
> Tom M.
> MSN Toolbar provides one-click access to Hotmail from any Web page =96=20=
> FREE download!=20
> Bf-committers mailing list