UnityEditor.ASHistoryWindow.HandleWebLikeKeyboard C# (CSharp) Method

HandleWebLikeKeyboard() private method

private HandleWebLikeKeyboard ( ) : void
return void
        private void HandleWebLikeKeyboard()
        {
            Event current = Event.current;
            if ((current.GetTypeForControl(this.m_HistoryControlID) == EventType.KeyDown) && (this.m_GUIItems.Length != 0))
            {
                switch (current.keyCode)
                {
                    case KeyCode.KeypadEnter:
                    case KeyCode.Return:
                        if (this.IsComparableAssetSelected())
                        {
                            this.DoShowDiff(false, this.ChangeLogSelectionRev, -1);
                        }
                        goto Label_02BB;

                    case KeyCode.UpArrow:
                        this.MoveSelection(-1);
                        goto Label_02BB;

                    case KeyCode.DownArrow:
                        this.MoveSelection(1);
                        goto Label_02BB;

                    case KeyCode.RightArrow:
                        if ((this.m_ChangeLogSelectionGUID == string.Empty) && (this.m_GUIItems.Length > 0))
                        {
                            this.m_ChangeLogSelectionGUID = this.m_GUIItems[this.m_ChangesetSelectionIndex].assets.folders[0].guid;
                            this.m_ChangeLogSelectionAssetName = this.m_GUIItems[this.m_ChangesetSelectionIndex].assets.folders[0].name;
                            this.m_FolderSelected = true;
                            this.m_AssetSelectionIndex = 0;
                        }
                        goto Label_02BB;

                    case KeyCode.LeftArrow:
                        this.m_ChangeLogSelectionGUID = string.Empty;
                        goto Label_02BB;

                    case KeyCode.Home:
                        if (this.m_ChangeLogSelectionGUID != string.Empty)
                        {
                            this.MoveSelection(-999999);
                        }
                        else
                        {
                            int num = this.FindFirstUnfilteredItem(0, 1);
                            if (num != -1)
                            {
                                this.m_ChangesetSelectionIndex = num;
                            }
                            this.ChangeLogSelectionRev = this.m_Changesets[this.m_ChangesetSelectionIndex].changeset;
                        }
                        goto Label_02BB;

                    case KeyCode.End:
                        if (this.m_ChangeLogSelectionGUID != string.Empty)
                        {
                            this.MoveSelection(0xf423f);
                        }
                        else
                        {
                            int num2 = this.FindFirstUnfilteredItem(this.m_GUIItems.Length - 1, -1);
                            if (num2 != -1)
                            {
                                this.m_ChangesetSelectionIndex = num2;
                            }
                            this.ChangeLogSelectionRev = this.m_Changesets[this.m_ChangesetSelectionIndex].changeset;
                        }
                        goto Label_02BB;

                    case KeyCode.PageUp:
                        if (Application.platform != RuntimePlatform.OSXEditor)
                        {
                            this.MoveSelection(-Mathf.RoundToInt((float) (this.m_ScrollViewHeight / this.m_RowHeight)));
                        }
                        else
                        {
                            this.m_ScrollPos.y -= this.m_ScrollViewHeight;
                            if (this.m_ScrollPos.y < 0f)
                            {
                                this.m_ScrollPos.y = 0f;
                            }
                        }
                        goto Label_02BB;

                    case KeyCode.PageDown:
                        if (Application.platform != RuntimePlatform.OSXEditor)
                        {
                            this.MoveSelection(Mathf.RoundToInt((float) (this.m_ScrollViewHeight / this.m_RowHeight)));
                        }
                        else
                        {
                            this.m_ScrollPos.y += this.m_ScrollViewHeight;
                        }
                        goto Label_02BB;
                }
            }
            return;
        Label_02BB:
            this.DoScroll();
            current.Use();
        }