configuring_keyboard_shortcuts_to_change_display_themes
configuring_keyboard_shortcuts_to_change_display_themes
1
So here what we want is to change the theme of the environment or the display theme using the shortcut key
2
There we will use system shortcut commands
3
You remember there are two things three things that we do rather that is object based command
4
page level command and system level command
5
So this time we will configure a system level command where any operator
6
any person having right using the shortcut key it would be changing the theme
7
In order to do so we have to use the setup activity and configure certain keyboard keys
8
Like if you look at this tab keyboard keys one of the key name is given
9
Same way I can add a key name and use the key code associated with this key
10
That would be a two step process
11
In first step we would be using the key name and then the associated key
12
Like here we have F4 key right So this is doing some behavior which would be used as a name key name
13
What command is to be executed that we would be using under visualization
14
So let's get certain entries
15
So rather than typing I'll prefer to copy certain commands and use them
16
right So these commands I have used in the keyboard keys
17
I can copy these keyboard keys
18
right Like you see
19
I have this key name and key code comment everything is given there in my file
20
So I can just copy this and paste it here
21
And there I would be using this paste command right So now that's the right place
22
So this way I have added my key name and associated key code
23
If you see in short what we are doing we are using Shift I for info Shift F1 for theme in gray color Shift F2 F3 F4 F5 F6 F7 F8
24
This way we are changing the themes
25
themes Now how we ensure that this key press would be performing a function Definitely there should be a function call
26
So for that purpose we would be going to visualization and configuring the remaining details
27
So let me save this part first under setup activity
28
Now we would be using this visualization activity
29
And under visualization I have to use this command
30
So that is if you see is keyboard command
31
So the keyboard command I have the keys defined already right So if you remember the key code that I have used
32
the key name right So here my key name related to a particular key code
33
So this key name would be used here as a key sequence
34
So I would be pasting that
35
And what command what function should be used in order to get that result right We would be doing so
36
So to achieve that I again have the commands written
37
So I'll copy my key sequence and other details right I can just copy this and go to the cell
38
And I'll be pasting all my by clicking on this paste
39
So this way I have all this information pasted right So just to save the time
40
So what actually I'm doing I'm calling this function called set themes
41
And these are some parameters which ensures that what theme I'm going to call
42
So this combination ensures that we have a key that when we press the key basically on pressing the key
43
this particular function is called right So let's check this and see how this is going to work
44
45
So we have clicked on run so which will actually compile and then run it
46
47
So we have a project of situational awareness type starter project
48
So we are using that
49
And by pressing certain keys I can show you how it is going to work
50
51
So that's trial license
52
No license basically is required for this demo
53
That's why we have not used any key
54
So if you see right now default blue theme is there right So what if I use shift 1
55
2 3 right I can show you the keyboard layout
56
This way I just use the keyboard
57
keyboard I press shift F1 for example
58
So you see color has changed right Same way I press shift F2
59
Again it goes change F3 F4
60
So this way different colors are there which are used
61
So it means our command is working well right So this is how you can just use it
62
Shift F8 is getting us back to our default mode right So that's what I want to show you on a small part which gives you the idea
63