Recent from talks
Contribute something
Nothing was collected or created yet.
Shortcut (computing)
View on Wikipedia
In computing, a file shortcut is a handle in a user interface that allows the user to find a file or resource located in a different directory or folder from the place where the shortcut is located. Similarly, an Internet shortcut allows the user to open a page, file or resource located at a remote Internet location or Web site.
Shortcuts are typically implemented as a small file containing a target URI or GUID to an object, or the name of a target program file that the shortcut represents. The shortcut might additionally specify parameters to be passed to the target program when it is run. Each shortcut can have its own icon. Shortcuts are very commonly placed on a desktop, in an application launcher panel such as the Microsoft Windows Start menu, or in the main menu of a desktop environment. The functional equivalent in the Macintosh operating system is called an alias. Unix-like systems have symbolic links which point to a target file, and often support .desktop files which provide additional configuration details.
Implementations
[edit]Microsoft Windows
[edit]| lnk | |
|---|---|
| Filename extension | .lnk, .url, .cda |
| Internet media type | application/x-ms-shortcut |
| Developed by | Microsoft Corporation |
| Type of format | file shortcut |
File shortcuts (also known as shell links) were introduced in Windows 95.[1] Microsoft Windows uses .lnk as the filename extension for shortcuts to local files, and .url for shortcuts to remote files, like web pages. Commonly referred to as "shortcuts" or "link files", both are displayed with a curled arrow overlay icon by default, and no filename extension. (The extension remains hidden in Windows Explorer even when "Hide extensions for known file types" is unchecked in File Type options, because it is controlled by the NeverShowExt option in HKEY_CLASSES_ROOT\lnkfile in the Registry. The IsShortcut option causes the arrow to be displayed.) Shortcut files can be used to launch programs in minimized or maximized window states if the program supports it.
Microsoft Windows .lnk files operate as Windows Explorer extensions, rather than filesystem extensions.[2] As a shell extension, .lnk files cannot be used in place of the file except in Windows Explorer, unless the application is explicitly providing support or using the shell APIs.
Although shortcuts, when created, point to specific files or folders, they may break if the target is moved to another location. When a shortcut file that points to a non-existent target is opened, Explorer will attempt to repair the shortcut. Windows 9x-based versions of Windows use a simple search algorithm to fix broken shortcuts.[1] On Windows NT-based operating systems and the NTFS file system, the target object's unique identifier is stored in the shortcut file and Windows can use the Distributed Link Tracking service for tracking the targets of shortcuts, so that the shortcut may be silently updated if the target moves to another hard drive.[3] Windows Installer, introduced in Windows 2000, added another special type of shortcut called "Advertised Shortcuts."
File shortcuts in Windows can store a working directory path besides the target path. Environment variables can be used. A hotkey can be defined in the shortcut's properties for shortcuts that are located in the Start Menu folders, pinned to the Taskbar or the Desktop.[4] In Windows 2000 onwards, file shortcuts can store comments which are displayed as a tooltip when the mouse hovers over the shortcut.
Generally, the effect of double-clicking a shortcut is intended to be the same as double-clicking the application or document to which it refers, but Windows shortcuts contain separate properties for the target file and the "start in" directory. If the latter parameter is not entered, attempting to use the shortcut for some programs may generate "missing DLL" errors, not encountered when the application is accessed directly.[5]
Filesystem links can also be created on Windows systems (Vista and up). They serve a similar function, although they are a feature of the file system.
Beginning with Windows 7, some shortcuts also store Application User Model IDs (AppUserModelIDs).[6] Instead of the target command line, AppUserModelIDs may directly be used to launch applications. Shortcuts with AppUserModelIDs are used by some desktop programs and all WinRT Modern/Universal Windows Platform apps for launching.
Although Windows does not provide convenient tools to create it, Explorer supports a "folder link" or "shell link folder": a folder with the system attribute set, containing a hidden "desktop.ini" (folder customization) file which tells Explorer to look in that same folder for a "target.lnk" shortcut file pointing to another folder. When viewed in Explorer, the shell link folder then appears to have the contents of the target folder in it—that is, the customized folder becomes the effective shortcut.[7] This technique is used by Microsoft Windows for items like WebDAV folders. The advent of file system links in Windows Vista and up has made shell link folders less useful.
There is another type of file that is similar to a .lnk file, but has the extension .cda. This is used to reference a track (song) on a CD (in standard CDDA / RedBook format).
Unix and Unix-like operating systems
[edit]| Desktop Entry | |
|---|---|
| Filename extension | .desktop |
| Internet media type | text/plain |
| Developed by | freedesktop.org |
| Type of format | file shortcut |
| Extended from | INI file |
On Unix-like systems, such as Linux, BSD, and macOS, a simple pointer to a target file or directory is implemented in the operating system as a symbolic link.
When the target is a program, many graphical user interfaces support .desktop and .directory files. The format of these configuration files follows the 'desktop entry' specification by freedesktop.org, and besides the location of the program they can provide an icon, a tooltip and other details.[8]
Mac
[edit]Macintosh does not have extensions for shortcuts. A file type called "alias" was introduced in Macintosh System 7; it tracks information like inode number to handle moves. Aliases in System 7 through Mac OS 9 were distinguished from other files by using names in italics. In Mac OS 8.5 and later, another distinguishing mark was added: an "alias arrow" – a black arrow with a thin, white border – similar to that used for shortcuts in Microsoft Windows.
Aliases are also supported in macOS; they are not supported by Unix APIs and commands, but are supported by higher-level APIs and the Finder. The names of aliases are no longer italicized, but the arrow badge remains. Additionally, an alias retains its dynamic reference to an object and does not have to be specified even when calling files on remote servers. symbolic links can be created with the Unix <mono>ln</mono> command. The Safari browser has its own property list-based format, .webloc, for storing Internet URLs.
History
[edit]To execute an application or render a file in early graphical user interfaces, the user had to click on the representation of the actual file or executable in the location where the application or file was. The concept of disassociating the executable from the icon representing an instruction to perform a task associated with that file or executable so that they may be grouped by function or task rather than physical organisation in the file structure was first described in the research paper "A Task Oriented Front End For The Windows Graphical User Interface", by Mike Roberts, published in 1991 by Kingston University and presented to both Microsoft and Xerox EuroPARC that same year under an academia/business technology sharing agreement.[citation needed] A simplified form of this research was incorporated into System 7 in 1991, and four years later into Windows 95.
See also
[edit]References
[edit]- ^ a b Chen, Raymond (October 2009). "Windows Confidential: Tracking Shortcuts". TechNet Magazine. Microsoft. Archived from the original on 12 October 2009. Retrieved 14 April 2019.
- ^ Chen, Raymond (September 2006). "Windows Confidential: Why are Shortcuts Files?". TechNet Magazine. Microsoft. Archived from the original on 4 July 2009. Retrieved 14 April 2019.
- ^ "Distributed Link Tracking on Windows-based domain controllers". Microsoft Corporation. 28 February 2007. Archived from the original on 9 April 2008. Retrieved 14 April 2019.
- ^ Deland-Han (2025-01-15). "Create a desktop shortcut with Windows Script Host - Windows Client". learn.microsoft.com. Retrieved 2025-03-26.
- ^ Cheng, Chieh (19 April 2008). "Dawn of War - Dark Crusade: Error Loading Module". GearHack. Retrieved 14 April 2019.
- ^ "Application User Model IDs (AppUserModelIDs)". MSDN. Microsoft. Archived from the original on 13 January 2015. Retrieved 14 April 2019.
- ^ Shultz, Greg (18 October 2004). "Manually creating junction points in Windows XP". Tech Republic. CBS Interactive. Archived from the original on 20 May 2017. Retrieved 14 April 2019.
- ^ "Desktop Entry Specification". freedesktop.org. 27 April 2020. Retrieved 2023-10-27.
External links
[edit]Windows LNK
- "MS-SHLLINK: Shell Link (.LNK) Binary File Format" from Microsoft
- Windows Shortcut File format specification of Joachim Metz, combining Microsoft specification and observations across Windows versions – for example, some aspects of Windows 95 behavior are not mentioned in MS-SHELLINK
- IShellLink interface for accessing .lnk files in the Windows API
- "Shellify" Archived 2010-07-30 at the Wayback Machine Shellify is a 100% managed .NET implementation of the Microsoft Shell Link (.LNK) Binary File Format for accessing .lnk files without the Windows API
- Win32::Shortcut - Perl Module to deal with Windows Shortcuts Perl library
.desktop files
- "Howto desktop file", a guide for .desktop files
Shortcut (computing)
View on GrokipediaBasic Concepts
Definition and Purpose
In computing, a shortcut is a mechanism that enables rapid access to commands, files, or resources, typically through key combinations or symbolic links, thereby bypassing the need to traverse full menus, directories, or paths.[2][1] This includes keyboard shortcuts, which are sequences of keystrokes assigned to perform specific actions, and file shortcuts, which act as pointers to target locations without duplicating content.[7] Such mechanisms streamline user interactions across interfaces, allowing direct invocation of functions that would otherwise require multiple steps.[8] The primary purpose of shortcuts originated from the need to minimize repetitive actions in early command-line environments and emerging graphical user interfaces, where users faced lengthy input sequences for routine tasks.[9] By providing abbreviated pathways, shortcuts facilitate efficient workflow in both text-based and visual computing paradigms, evolving to support diverse input methods like keyboards and pointing devices.[10] Key benefits of shortcuts include significant time savings through accelerated task execution, reduced cognitive load by enabling intuitive and memorable access patterns, and decreased error rates from avoiding intricate navigation hierarchies.[8] These advantages promote productivity for users of varying expertise, as novices can rely on guided menus while experts leverage shortcuts for speed.[10] Common use cases encompass navigating within applications via key sequences, accessing files through linked icons, and managing system controls without extensive mouse or keyboard traversal.[7]Distinction from Related Terms
In computing, the terms "shortcut" and "hotkey" are frequently used interchangeably to describe key combinations that trigger specific actions, but hotkeys often emphasize hardware-specific triggers, such as function keys (Fn) combined with other keys to control system-level functions like volume adjustment or screen brightness on laptops.[5] Keyboard shortcuts, by contrast, are primarily software-defined mappings within applications or operating systems for immediate command execution, such as Ctrl+C to copy text.[7] Shortcuts differ from macros in their scope and complexity; a shortcut typically invokes a single, predefined action or command directly, whereas a macro automates a sequence of multiple instructions, such as recording a series of keystrokes, mouse clicks, and menu selections to perform repetitive tasks.[11] For instance, while a keyboard shortcut might bold selected text with a single key press, a macro could format an entire document by applying bolding, adjusting fonts, and inserting headers in succession. This distinction ensures shortcuts prioritize quick, atomic operations, avoiding the overhead of scripted automation.[12] Gestures represent a distinct input paradigm from shortcuts, relying on physical motions like swipes, pinches, or taps on touch-sensitive surfaces rather than keyboard presses or icon clicks to execute commands.[13] In touch-enabled environments, such as mobile devices or trackpads, gestures enable intuitive interactions—e.g., a two-finger swipe to scroll—contrasting with the discrete, memorization-based nature of keyboard shortcuts like Ctrl+V for pasting. This separation highlights shortcuts' focus on traditional input devices, while gestures leverage natural body movements for broader accessibility.[14] Aliases, particularly in command-line interfaces, serve as a boundary case to shortcuts by functioning as simple string substitutions or renaming mechanisms for commands, without providing the direct graphical execution or file access typical of shortcuts.[15] For example, in Unix-like shells, an alias might redefine "ll" to expand to "ls -l" for listing files, acting purely as a textual shorthand during command entry rather than a clickable icon or key binding that launches resources immediately.[15] In graphical contexts, such as macOS, aliases (distinct from command-line aliases) are file pointers equivalent to Windows shortcuts, allowing users to double-click the alias for instant access to the original item without navigating to its location.[16]Types of Shortcuts
Keyboard Shortcuts
Keyboard shortcuts in computing are combinations of keys pressed simultaneously to execute commands efficiently, typically involving one or more modifier keys paired with an alphanumeric or function key. These shortcuts enable users to perform actions without navigating menus or using a mouse, enhancing productivity in graphical user interfaces. The mechanics rely on hardware detection of simultaneous key presses, where the operating system or application interprets the combination to trigger a predefined action.[17][18] Modifier keys, such as Control (Ctrl), Alt, Shift, Option (on macOS), and Command (⌘ on macOS), modify the behavior of the primary key to distinguish shortcuts from standard input. For instance, Ctrl or Command serves as the primary modifier for most commands, while Shift often extends or modifies the action (e.g., selecting multiple items). These keys are hardware-specific but standardized across platforms to ensure familiarity. Applications avoid conflicting with system-reserved modifiers like the Windows key to prevent interference.[17][18] Universal standards for keyboard shortcuts often employ mnemonic conventions, where the primary key corresponds to the first letter of the action's English name, promoting intuitiveness and cross-application consistency. For example, Ctrl+S (or Command+S on macOS) for "save" derives from the letter S, a practice rooted in early GUI design guidelines to aid memorization, particularly for English users, though adaptations exist for localization. These mnemonics form de facto standards in many productivity tools, reducing the learning curve for users switching between software.[17][18] Keyboard shortcuts are categorized into three main types based on scope and applicability. Global shortcuts operate system-wide, affecting the entire operating environment regardless of the active application, such as invoking search functions. Application-specific shortcuts are defined within individual programs for common tasks like editing or navigation, limited to that software's context. Contextual shortcuts activate only under specific conditions, such as when a particular tool or menu is selected, allowing dynamic reuse of key combinations across different scenarios within an app. This categorization ensures shortcuts remain intuitive without overwhelming the keyboard layout.[17][18] Common cross-platform examples illustrate these standards, with minor variations for platform conventions (e.g., Ctrl on Windows/Linux versus Command on macOS). For copying selected content to the clipboard, the shortcut is Ctrl+C or Command+C; pasting uses Ctrl+V or Command+V; and undoing the last action employs Ctrl+Z or Command+Z. These are widely adopted in text editors, browsers, and office applications to facilitate seamless data manipulation across environments.[17][18]File and Desktop Shortcuts
File and desktop shortcuts serve as graphical pointers to files, folders, or applications on a computer system, enabling users to access these targets directly without navigating to their full storage paths. Unlike actual copies, these shortcuts are lightweight link files that reference the original item's location, often distinguished by a small arrow icon overlay. They are a fundamental feature in graphical user interfaces across various operating systems, promoting efficient workflow by reducing the steps needed for common tasks.[2][1] The creation process typically involves using context menus: users right-click on a file, folder, or application icon and select an option to generate a shortcut, which produces a link file—such as those with a .lnk extension or equivalent formats—pointing to the target's path. This new shortcut can then be dragged and placed on the desktop or within folders for easy visibility and access. In some interfaces, shortcuts can also be created via drag-and-drop from file explorers directly to the desktop, streamlining the setup for quick organization.[2][19] Functionally, desktop shortcuts function as clickable icons that immediately open or launch their referenced targets, bypassing deeper menu structures or path entry. They support drag-and-drop interactions, allowing users to rearrange icons on the desktop or move them into other locations like taskbars or docks for customized layouts. This enables seamless integration into daily computing routines, such as pinning essential tools for one-click activation.[1][19] However, these shortcuts have inherent limitations: they do not duplicate the original files, conserving storage but risking breakage if the target is relocated, renamed, or deleted, at which point the link fails and prompts an error upon activation. Excessive reliance on desktop shortcuts can also clutter the interface, potentially hindering navigation if not managed properly.[1][20] Common use cases encompass desktop organization for frequently accessed items, rapid application launches to minimize startup time, and facilitating hierarchical navigation in file explorers by placing shortcuts to nested folders or drives. For instance, users often create desktop shortcuts to productivity software or project directories to streamline repetitive tasks without repeated searches.[1][21]Symbolic and Alias Shortcuts
Symbolic links, often abbreviated as symlinks, are special files in Unix-like operating systems that serve as references to other files or directories, allowing users to access the target through an alternative path without duplicating the data.[22] These links contain the pathname of the target as their content, enabling indirect access that can span across different filesystems.[22] To create a symbolic link, theln command is used with the -s option, such as ln -s /path/to/target linkname, where the target can be specified using either absolute or relative paths depending on the desired flexibility in file movement.[22] Relative paths in symlinks maintain their reference even if the linked structure is relocated, whereas absolute paths point to fixed locations and may break if the target moves.[22]
In contrast to hard links, which create an additional directory entry pointing directly to the same inode and data blocks, symbolic links act as indirect pointers that do not duplicate the file's content and can reference files on different filesystems or even non-existent targets, leading to "dangling" links if the target is deleted.[23] Hard links share the same file permissions and ownership as the original, incrementing the link count until all are removed, at which point the data is deallocated; symbolic links, however, have their own independent metadata and remain valid only as long as the target exists.[23] This distinction makes symlinks more versatile for cross-device linking but potentially less reliable due to the risk of broken references.[23]
In macOS, aliases serve as a native type of file shortcut, functioning as references to files, folders, applications, or disks. Unlike symbolic links, which store only the target's pathname, aliases include additional metadata such as the original file's location, volume information, and inode number, enabling the system to locate the target even if it has been moved or renamed within the same volume. Aliases can be created in the Finder by selecting an item and choosing File > Make Alias, or by holding the Option and Command keys while dragging the item to a new location. They are represented by icons with a small curved arrow and do not duplicate the original item's data.[24][25]
Symbolic links and aliases find extensive applications in programming, where they facilitate modular code organization by linking shared libraries or configuration files across projects, reducing redundancy and easing maintenance. In backup systems, they enable efficient space usage by referencing common data sets without full copies, as seen in strategies that preserve directory structures while minimizing storage overhead. In scripting and system administration, symbolic links provide path abstraction for dynamic locations, enhancing portability and readability in automation tasks like data processing pipelines.[22][23]
Platform Implementations
Microsoft Windows
In Microsoft Windows, shortcuts encompass both keyboard combinations for rapid system and application navigation and file-based pointers that provide quick access to files, folders, or programs. The Windows key, introduced with Windows 95, serves as a primary modifier for many built-in keyboard shortcuts, enabling efficient interaction with the operating system without relying on the mouse. The Copilot key, introduced in 2024 on new Windows PCs, launches the Copilot AI assistant, serving as a dedicated shortcut similar to the Windows key for system interactions.[26] For instance, pressing Windows key + R opens the Run dialog for executing commands or launching applications, while Windows key + E launches File Explorer to browse files and folders.[27][28] These shortcuts integrate deeply with applications, such as Alt + Tab for cycling through open windows, allowing seamless task switching across the desktop environment.[27] File shortcuts in Windows use the .lnk binary format, defined in the Shell Link specification, which stores metadata including the target path, icon, and optional command-line arguments to customize execution.[29] Users create .lnk files through the graphical interface by right-clicking a file or folder, selecting "Create shortcut," or via the desktop context menu under New > Shortcut, where the target location and name are specified.[30] Properties of .lnk files, accessible by right-clicking and selecting Properties, allow modifications like changing the display icon from a system library or adding arguments for parameterized launches, such as running a program with specific flags. For symbolic links, which differ from .lnk files by creating filesystem redirects rather than metadata pointers, the mklink command in Command Prompt generates hard or soft links to targets, useful for advanced file organization. Customization of shortcuts in Windows occurs primarily through built-in accessibility options and supplementary tools. In Settings > Accessibility > Keyboard, users can enable features like Sticky Keys to modify shortcut behavior for easier input or Filter Keys to ignore brief or repeated keystrokes, enhancing usability for diverse needs.[4] For remapping keys or creating custom combinations, Microsoft's PowerToys utility includes a Keyboard Manager that allows reassigning individual keys or entire shortcuts without third-party software.[31] Third-party tools like AutoHotkey extend this further by scripting complex hotkeys and automations, such as remapping the Windows key to a different function via simple text-based scripts.[32] Windows features unique shortcut enhancements like jump lists, which appear upon right-clicking taskbar-pinned application icons and display recent files, pinned items, or common tasks for quick access.[33] Similarly, the Start menu supports pinning shortcuts to tiles or apps, organizing frequently used items in a customizable grid that integrates with search and recommendations for streamlined navigation.[30] These elements, refined across Windows versions, emphasize graphical efficiency in shortcut management.macOS
In macOS, the Command (⌘) key serves as the primary modifier for keyboard shortcuts, enabling quick access to system features and applications. For instance, pressing Command-Space bar opens the Spotlight search interface, allowing users to locate files, launch apps, or perform calculations directly from the keyboard. Similarly, Mission Control, which provides an overview of all open windows and desktops, can be activated using Control-Up Arrow or the dedicated Mission Control key (often F3 on Apple keyboards), with additional gestures like swiping up with three fingers on a trackpad for seamless navigation between spaces. macOS Sequoia introduced window tiling shortcuts, enabling users to resize and arrange windows via keyboard, such as holding Option while dragging to edges or using menu options for snapping.[34][35][36][37] File shortcuts in macOS primarily utilize aliases, which are lightweight pointers to original items without duplicating data. To create an alias, users can select an item in the Finder and choose File > Make Alias, or press and hold Option-Command while dragging the item to a new location, such as the desktop or another folder; this method generates the alias in a single step while leaving the original intact. Aliases function identically to their targets, opening the same content when double-clicked, and can be placed in the Dock for persistent access by dragging them to the right side of the Dock divider.[24][35][38] Customization of shortcuts is handled through System Settings, where users can modify or add app-specific key combinations. To access this, navigate to Apple menu > System Settings > Keyboard > Keyboard Shortcuts, then select categories like App Shortcuts to create new mappings, such as assigning a custom combination to a menu item in a specific application; conflicts can be resolved by editing or disabling overlapping shortcuts.[39][40] macOS integrates shortcuts with voice and automation tools for enhanced functionality. The Shortcuts app allows creation of voice-activated chains via Siri, where users can build multi-step workflows—such as searching emails and summarizing results—and trigger them by saying a custom phrase like "Hey Siri, daily report." As of 2025, the Shortcuts app integrates Apple Intelligence for advanced actions like text summarization and image generation within workflows. Additionally, Automator workflows can be imported directly into the Shortcuts app, converting legacy automations into modern shortcuts for tasks like batch file processing or system scripting.[41][42][43][44]Unix-like Systems
In Unix-like systems, shortcuts emphasize command-line efficiency and open-source customization, enabling users to streamline interactions across diverse distributions such as Linux and BSD variants. Keyboard shortcuts in terminals are fundamental, with combinations like Ctrl+C generating the SIGINT signal to interrupt running processes, a standard behavior inherited from early Unix shells. This signal handling ensures safe termination of foreground jobs without affecting the shell itself, promoting reliable workflow management in environments like bash or zsh. Aliases provide command-line shortcuts by substituting complex commands with simpler ones, typically defined in shell configuration files such as ~/.bashrc for bash users. For instance, an alias likealias ll='ls -l' expands to the full command upon invocation, loaded automatically during shell initialization for persistent customization.[45] Key bindings further enhance terminal navigation, configurable via the bind builtin in bash for Readline editing or bindkey in zsh for its ZLE editor; these allow mapping sequences like Ctrl+X Ctrl+R to reload configurations or navigate command history.[46]
File and symbolic shortcuts leverage the ln command to create links, with the -s option producing symbolic links that point to targets via path references, facilitating flexible file access without duplication.[47] In graphical environments, .desktop files serve as standardized launchers for applications, containing metadata like executable paths and icons; these are supported across desktops such as GNOME and KDE, placed in directories like ~/.local/share/applications/ for user-specific shortcuts.[48]
Customization in Unix-like systems varies by distribution due to modular architectures, with Linux often using X11's XGrabKey for global key event interception in window managers, while BSD implementations like FreeBSD may differ in kernel-level input handling and Xorg integration, affecting shortcut portability. Shell profiles like ~/.zshrc extend this flexibility, allowing distro-agnostic bindings through Readline emulation in zsh, underscoring the emphasis on text-based scripting over proprietary GUIs.[49]
