2023年12月24日 星期日

Mircrosoft Windows 11 鍵盤的 Windows Key Shortcuts

Mircrosoft Windows 11 鍵盤的 Windows Key Shortcuts:

最近公司分派了 1台新電腦給筆者,新電腦是 1台 Intel i7 的手提電腦,當然操作系統和 Mircrosoft Office 是較新的版本,操作系統是 Windows 11 版本,Mircrosoft Office 是 365 版本,兩個常用的軟件對筆者來說都是比較陌生,很多新的功能都要從新學習!

Mircosoft Windows 11 鍵盤的 Windows Key
首先就是操作系統 Windows 11,在電腦的鍵盤 Ctrl 和 Alt 鍵之中間,有 Microsoft Windows 圖案鍵(Windows logo key),這個是 Windows 鍵(Windows key / WinKey),原來這個 Windows 鍵是微軟從 Windows 8 開開始已經使用。當按下Windows鍵加上其它的鍵,便會組合成不同快速鍵(Shortcuts),並提供不同的功能,非常方便。

Windows 11 的 Windows Key Shortcuts:

Key combination

Function

WinKey

Open or close the Windows Start menu

WinKey + A

Opens the Action Center

WinKey + B

Highlights the notification area

WinKey + C

Opens Windows Copilot.

WinKey + D

Toggles Show Desktop and the previous state

WinKey + E

Opens File Explorer in the Quick Access tab

WinKey + F

Opens the Microsoft Feedback hub

WinKey + G

Opens the Game Bar tools, for use during personal time

WinKey + H

Opens the Dictation toolbar.

WinKey + I

Opens the Settings

WinKey + K

Opens the Connect pane to connect to wireless displays and devices

WinKey + L

Locks the device

WinKey + M

Minimizes all open windows

WinKey + O

Locks the devices orientation on tablets and mobile devices

WinKey + P

Opens the Project pane

WinKey + Q

Opens Search

WinKey + R

Displays the run dialog box

WinKey + S

Opens Cortana in typing mode

WinKey + T

Cycles through the apps on the taskbar

WinKey + U

Opens the Ease of Access/Display Center to manage attached displays

WinKey + V

Pulls up the clipboard app to view things copied to it with Ctrl + C

WinKey + X

Pulls up the advanced, Secret Start menu

WinKey + Y

Switch input between Windows Mixed Reality and your desktop

WinKey + Z

Activates the command bar for Metro-style applications

WinKey + Space bar

Preview the desktop

WinKey + Home

Minimize all except the active desktop window (restores all windows on second stroke)

WinKey +

Zoom in

WinKey +

Zoom out

WinKey + ESC

Closed Magnifier Zoom

WinKey + ∕

Begin IME reconversion

WinKey + ← →

Takes the active window and adjusts it to fill the left or right side of the monitor it is displayed in

WinKey + ↑

Maximizes the active window

WinKey + ↓

Minimizes the active window

WinKey + PrtScr

Opens Snip & Sketch tool to capture screen selection and puts into clipboard

WinKey + Pause

Opens StartSettings→System→About

WinKey + .

Open the Emojis

WinKey + ,

Open the Workspace (temporality) (ends when you release the key)

WinKey + Tab

Open Task view

WinKey + Number

Open the 1st~ 9th app in taskbar

WinKey + Ctrl + C

Enables or disables the color filters

WinKey + Ctrl + D

Creates a new virtual desktop

WinKey + Ctrl + F

Search for PCs (if you are on a network)

WinKey + Ctrl + Q

Open Quick Assist

WinKey + Ctrl + Spacebar

Change to a previously selected input

WinKey + Ctrl + Enter

Turn on Narrator

WinKey + Ctrl + Number

Open the desktop and switch to the last active window of the app pinned to the taskbar in the position indicated by the number

WinKey + Shift + C

Open the charms menu

WinKey + Shift + S

Opens Snip & Sketch tool to capture screen selection and puts into clipboard

WinKey + Shift + T

To iterate through items on the taskbar from right to left

WinKey + Shift + M

Restore minimized windows to the desktop

WinKey + Shift + V

Set focus to a notification

WinKey + Shift + Number

Open the desktop and start a new instance of the app pinned to the taskbar in the position indicated by the number

WinKey + Shift + ← →

Moves the active window over to another display

WinKey + Shift +↑

Stretch the desktop window to the top and bottom of the screen

WinKey + Shift +↓

Restore/minimize active desktop windows vertically, maintaining width

WinKey + Alt + B

Turn HDR on or off

WinKey + Alt + K

Toggle microphone mute in apps that support Call Mute

WinKey + Alt + R

Record video of game window in focus (using Xbox Game Bar)

WinKey + Alt + Enter

Open taskbar settings

WinKey + Alt + Number

Open the desktop and open the Jump List for the app pinned to the taskbar in the position indicated by the number

WinKey + Alt +↑

Snap window in focus to top half of screen

WinKey + Alt +↓

Snap window in focus to bottom half of screen

WinKey + Ctrl + Shift + B

Wake PC from blank or black screen

WinKey + Ctrl + Shift + Number

Open the desktop and open a new instance of the app located at the given position on the taskbar as an administrator

WinKey + Ctrl + Shift + Alt

Opens website https://www.office.com/?from=OfficeKey

WinKey + Ctrl + Shift + Alt + D

Opens OneDrive

WinKey + Ctrl + Shift + Alt + L

Opens website LinkedIn

WinKey + Ctrl + Shift + Alt + N

Opens OneNote

WinKey + Ctrl + Shift + Alt + O

Opens Outlook

WinKey + Ctrl + Shift + Alt + P

Opens PowerPoint

WinKey + Ctrl + Shift + Alt + T

Opens Teams

WinKey + Ctrl + Shift + Alt + W

Opens Word

WinKey + Ctrl + Shift + Alt + X

Opens Excel


2023年 12月 24日(Sun)天氣報告
氣溫:33.0°F / 1.0°C @ 07:00
風速:每小時 13公里
降雨機會:0%
相對濕度:百分之 98%
天氣:多雲
※ Merry Christmas !

2023年11月23日 星期四

Android Studio - FileProvider 介紹(一百一十五)

Android Studio - FileProvider 介紹(一百一十五):

FileProvide 是在Android 7.0 出現的新特性,它是 ContentProvider 的子類,可以通過創建一個 content://格式的 Content URI 並賦予臨時的檔存取權限來代替 File URI 實現檔共用。但在 Android 10 開始引入了分區存儲的概念,Android 11 開始強制執行,FileProvider 類是 AndroidX 核心庫的一部分,也就是以前可以任意的訪問SD卡下任意目錄,Android 11 上則不能隨意訪問,除了 /sdcard/Android/data/ 應用包名目錄下的內容外,其它目錄都已禁止訪問,音樂、視頻、照片、下載目錄、文件(Music、Video、DCIM、Download、Document)下的檔需要向使用者申請許可權,允許後才可訪問。

Android Studio FileProvider
FileProvider 的出現可以解決檔案共用的問題,提升了檔案文件訪問的安全性。FileProvider 默認就具有生成 content:// 格式的 Uri 的功能,因此我們不需要在代碼中編寫它的子類,幾乎所有的代碼都只需要在 XML 檔中進行配置即可。要配置 FileProvider,我們首先需要在 AndroidManifest.xml 檔中通過 標籤進行聲明,並配置自訂的 android:authorities 屬性。

FileProvider 實現檔共用功能的步驟:
在 AndroidManifest.xml 中聲明 FileProvider
創建一個 xml 檔定義 FileProvider 的路徑
創建一個 file_paths.xml 檔,並定義檔路徑
獲取文件的 Uri
啟動其他應用來處理文件

AndroidManifest.xml:
</manifest>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.example.myapp">
        <application
            ...>
            <provider
                android:name="androidx.core.content.FileProvider"
                android:authorities="com.example.myapp.fileprovider"
                android:grantUriPermissions="true"
                android:exported="false">
                <meta-data
                    android:name="android.support.FILE_PROVIDER_PATHS"
                    android:resource="@xml/filepaths" />
            </provider>
            ...
        </application>
    </manifest>

paths下標籤和路徑介紹:

序號

標籤名

對應API

1

android:name

指定FileProvider的類別名,通常使用

androidx.core.content.FileProvider / androidx.support.v4.content.FileProvider

2

android:authorities

指定FileProviderauthority,需要確保它在裝置上是唯一的

3

android:exported

設定為false,表示該FileProvider只能被本應用程式存取

4

android:grantUriPermissions

設定為true,表示授予其他應用程式對該FileProvider傳回的Uri的臨時存取權限

5

<meta-data>

標籤用於指定FileProvider的路徑設定檔,這裡是@xml/file_paths


在 AndroidManifest.xml 的編碼中,android:name 屬性通暢配置為 androidx.core.content.FileProvider(如果當前專案基於Android 7.0,則需要配置為android.support.v4.content.FileProvider);android:authorities 屬性是當前應用的授權字串,是其他應用訪問當前應用中文件的憑證;android:exported 屬性工作表示該 FileProvider 是否是公有的,一般情況下都設為 false;android:grantUriPermissions 屬性工作表示是否可以為檔賦予臨時存取權限,一般情況下都設為true。如果我們想要擴展默認的 FileProvider,則 android:name 屬性需要配置為我們自訂的 FileProvider 類的全路徑。

xml/filepaths.xml:
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
    <root-path name="root" path="" />
    <files-path name="files" path="images/" />
    <cache-path name="cache" path="" />
    <external-path name="external" path="" />
    <external-files-path  name="external-files" path="" />
    <external-cache-path name="external-cache" path="" />
    <external-media-path name="external-media" path="" />
</paths>

Androidx paths下標籤和路徑介紹:

序號

標籤名

對應API

對應路徑

1

files-path

Context.getFilesDir()

/data/user/0/com.ttxz.testa/files

2

cache-path

Context.getCacheDir()

/data/user/0/com.ttxz.testa/cache

3

external-path

Environment.getExternalStorageDirectory()

/storage/emulated/0

4

external-files-path

Context.getExternalFilesDir(String type)

/storage/emulated/0/Android/data/com.ttxz.testa/files

5

external-cache-path

Context.getExternalCacheDir()

/storage/emulated/0/Android/data/com.ttxz.testa/cache

6

external-media-path

Context.getExternalMediaDirs()

[/storage/emulated/0/Android/media/com.ttxz.testa]


Android 7.0 的paths下標籤和路徑介紹:

標籤

標籤代表路徑

path=files”代表路徑

root-path

設備的根目錄

/files/*

files-path

內部存儲空間應用私有目錄下的 files/ 目錄,等同於context.getFilesDir()

context.getFilesDir()+/files/*

cache-path

內部存儲空間應用私有目錄下的 cache/ 目錄,等同於context.getCacheDir()

context.getCacheDir()+/files/*

external-path

外部存儲空間根目錄,等同於Environment.getExternalStorageDirectory()

Environment.getExternalStorageDirectory()+/files/*

external-files-path

外部存儲空間應用私有目錄下的 files/ 目錄,等同於context.getExternalFilesDirs()

context.getExternalFilesDirs()+/files/*

external-cache-path

外部存儲空間應用私有目錄下的 cache/ 目錄,等同於getExternalCacheDirs()

getExternalCacheDirs()+/files/*


為了讓其他應用可以訪問當前應用下的檔,我們還需要配置哪些資料夾可以被訪問,這個步驟也是在 XML 檔中配置的。我們需要在專案的 /res/xml 資料夾下創建一個路徑設定檔,命名為 filepaths.xml(檔案名可以自訂),這個檔中的根節點是,在這個節點下設定檔夾。

2023年 11月 23日(Thu)天氣報告
氣溫:44.0°F / 7.0°C @ 07:00
風速:每小時 6公里
降雨機會:2%
相對濕度:百分之 62%
天氣:多雲