({{, (RefLink[InputNotebook, paclet:ref/InputNotebook])[]
gives the current notebook into which keyboard input in the front end will be directed. }})

OpenersNotesSection(Spacer1)Details

(RefLink[InputNotebook, paclet:ref/InputNotebook]) returns a (RefLink[NotebookObject, paclet:ref/NotebookObject]).

If there is no current input notebook, (RefLink[InputNotebook, paclet:ref/InputNotebook])[] will return (RefLink[$Failed, paclet:ref/$Failed]).

The current input notebook is the notebook to which textual commands in the front end are normally directed.

A palette window can be a currently selected notebook but cannot normally be an input notebook.

OpenersPrimaryExamplesSection(Spacer1)Examples  (3)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Give the notebook object for the current input notebook:

InputNotebook[]

Perform additional operations:

Options[%,WindowSize]

OpenersExampleSection1(Spacer1)Properties & Relations  (1)

The notebook that starts an evaluation might not be the input notebook:

nb=CreateDocument["document"];
{InputNotebook[],EvaluationNotebook[]}

OpenersExampleSection2(Spacer1)Possible Issues  (1)

Both programmed operations and user interactions can change which notebook is taking input:

nb=CreateDocument[{a,b,c},WindowTitle->"Other"];

(SetSelectedNotebook[EvaluationNotebook[]];snb1=InputNotebook[];
SetSelectedNotebook[nb];snb2=InputNotebook[];)

"WindowTitle"/.NotebookInformation/@{snb1,snb2}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Notebooks, paclet:ref/Notebooks])  ▪  (RefLink[SelectedNotebook, paclet:ref/SelectedNotebook])  ▪  (RefLink[EvaluationNotebook, paclet:ref/EvaluationNotebook])  ▪  (RefLink[ButtonNotebook, paclet:ref/ButtonNotebook])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Manipulating Notebooks from the Kernel, paclet:tutorial/ManipulatingNotebooksFromTheKernel])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Low-Level Notebook Programming, paclet:guide/LowLevelNotebookProgramming])}})}})